legalize+jeeves@mail.xmission.com (Richard) writes:
[Please do not mail me a copy of your followup]
Alexander Lamaison
spake the secret code <868uu8nv96.fsf@doc.ic.ac.uk> thusly: As 'CHECK' is the assertion level you should use by default, [...]
I don't know why you would say that when it is contrary to accepted unit testing practices and the behavior of assertions in other testing frameworks in every other language otu there.
Tests cases should test one, and only one, logical concept each. Therefore, multiple assertions in the same tests case will all be testing the same concept. In other words, they are, together, constructing a report of the failure. Often this is possible using only one assertion, in which case CHECK and REQUIRE are equivalent, but sometimes more than one non-mutually-exlusive assertion is needed to give the full picture.
For instance, jUnit doesn't continue executing the test past the first failed assertion. Neither do unit testing frameworks in JavaScript or Python or PHP, etc.
Their loss ;) Seriously though, I find it helps to have multiple bits of data included a single test cases's failure report. It maximises my chances of getting the case to pass next time, which is important in C++ where there is compilation step in between to slow down the test-edit-test loop. Alex -- Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)