unittest-cpp/unittest-cpp — pull request #63 by paxos1977 (2014-12-07 05:10:25+00:00)
Title: Required macro as for loop (with issues fixed)

I riffed on pjohnmeyer's fix for REQUIRE that used a for loop to get the desired syntax. I primarily fixed two issues:
(1) no more unreachable code in the for loop.
(2) code appearing after a failing check in a REQUIRE block will no longer execute.

I used a RAII object instantiated in the for loop declaration to install a decorated TestReporter (ThrowingTestReporter) to achieve the desired behavior and eliminate the for loop shenanigans.

My main concern now is whether we should use UnitTest::AssertException for this or use a new exception. The changes to UnitTest++/CheckMacros.h could potentially be a breaking change to any existing code using AssertException in unexpected ways.