mirror of
https://github.com/unittest-cpp/unittest-cpp
synced 2026-09-26 16:19:30 +03:00
(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.
18 lines
No EOL
414 B
C
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 |