
[Please do not mail me a copy of your followup] boost@lists.boost.org spake the secret code <867g9pr6id.fsf@doc.ic.ac.uk> thusly:
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.
OK, I can see this point of view. I suppose if you wrote your own custom assertion and it returned boost::test_tools::predicate_result to build up a detailed expectation failure message this would also be the case. The reason I objected is because too often I see people getting the wrong "take away message" and violating the assumption you stated in your first paragraph while accepting the pattern in your second paragraph. The end result is brittle tests the fail too often and give unit testing in general a bad reputation. -- "The Direct3D Graphics Pipeline" free book http://tinyurl.com/d3d-pipeline The Computer Graphics Museum http://computergraphicsmuseum.org The Terminals Wiki http://terminals.classiccmp.org Legalize Adulthood! (my blog) http://legalizeadulthood.wordpress.com