On Jun 13, 2013, at 3:59 AM, Christian Stimming <christ...@cstimming.de> wrote:
> Am Montag, 10. Juni 2013, 18:35:11 schrieb Alex Aycinena: >> Hi, >> >> Christian - I believe you did something recently in this area and make >> check doesn't complete; perhaps related? > > Unfortunately yes (due to the PWARN -> PINFO change). Thanks for pointing > this > out. I've explained it in the commit message. Christian, You wrote in the commit message: "Sigh. It turns out the utest-Split.c relies on the "warning" log level in order to check for specific code paths. This sucks. The log level "warning" should please be reserved for things that are actual warnings, not for code path checks that are used in the unittests." That's not correct. utest-Split may rely on the presence of the message to check the code path, and in order to do so needs to match the loglevel, logdomain, and message string. If you change one of those in the tested function, you just change it to match in the test and it should work. In this case you want to change the "foo differ" warnings to infos. No big deal, just change the loglevel in the tests to match. Now, ideally unit tests would only be checking the message to make sure that it's emitted: That's a side-effect of the function, and a unit test should test all of the function's effects. Unfortunately most of the engine consists of over-long functions with multiple code paths whose behavior is difficult to test correctly coupled with excessive class interdependencies . In order to be able to refactor them for better testability I have to first get them tested somehow so that I'll know when I break something in the refactor. Regards, John Ralls _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel