unittest-cpp/UnitTest++/RequireMacros.h
Austin Gilbert a9161c1ba6 This commit addresses two issues:
(1) unreachable code in for loop shenanigans is eliminated.
(2) code after a failing REQUIRE check no longer executes. Used a
    decorating TestReporter to achive this.
2016-02-06 09:29:38 -06:00

18 lines
No EOL
414 B
C

#ifndef UNITTEST_REQUIREMACROS_H
#define UNITTEST_REQUIREMACROS_H
#include "RequiredCheckTestReporter.h"
#ifdef REQUIRE
#error UnitTest++ redefines REQUIRE
#endif
#ifndef UNITTEST_NO_EXCEPTIONS
#define REQUIRE for(UnitTest::RequiredCheckTestReporter decoratedReporter(UnitTest::CurrentTest::Results()); decoratedReporter.next(); )
#endif
#ifdef UNITTEST_NO_EXCEPTIONS
#define REQUIRE
#endif
#endif