unittest-cpp/tests
Austin Gilbert e7b56d4e3c Introducing additional functionality to allow client code to stop a unit
test when an assert fails.

The following macro has been added:

	REQUIRE

An example of when these type of checks are useful:

    std::vector<int> v = foo();

    REQUIRE(CHECK_EQUAL(3, v.size())); // test stops here on a fail
                                       // so we don't segfault looking at
                                       // v[0] below.
    CHECK_EQUAL(1, v[0]);
    CHECK_EQUAL(2, v[1]);
    CHECK_EQUAL(3, v[2]);

Multiple checks are supported as follows:

    REQUIRE({
        CHECK_EQUAL(1, 2);
        CHECK(true);
    };

In the multiple check scenario, all the checks in the REQUIRE block will
be run. After which, if any failures were reported, the TEST case will
be stopped.

When UNITTEST_NO_EXCEPTIONS is defined, REQUIRE is a noop.
2016-02-06 09:28:48 -06:00
..
Main.cpp Add uncrustify config and run first pass. 2016-01-29 22:15:10 -06:00
Makefile.am Adding conditional automake directives to allow Win32 compilation on win32-mingw/cygwin-mingw systems. 2015-04-07 08:46:20 -04:00
RecordingReporter.h Add uncrustify config and run first pass. 2016-01-29 22:15:10 -06:00
ScopedCurrentTest.h Change preprocessor indent rules. 2016-01-29 22:22:37 -06:00
TestAssertHandler.cpp Change preprocessor indent rules. 2016-01-29 22:22:37 -06:00
TestCheckMacros.cpp Add uncrustify config and run first pass. 2016-01-29 22:15:10 -06:00
TestChecks.cpp Add uncrustify config and run first pass. 2016-01-29 22:15:10 -06:00
TestCompositeTestReporter.cpp Add uncrustify config and run first pass. 2016-01-29 22:15:10 -06:00
TestCurrentTest.cpp Add uncrustify config and run first pass. 2016-01-29 22:15:10 -06:00
TestDeferredTestReporter.cpp Change preprocessor indent rules. 2016-01-29 22:22:37 -06:00
TestExceptions.cpp Add uncrustify config and run first pass. 2016-01-29 22:15:10 -06:00
TestMemoryOutStream.cpp Change preprocessor indent rules. 2016-01-29 22:22:37 -06:00
TestRequireMacros.cpp Introducing additional functionality to allow client code to stop a unit 2016-02-06 09:28:48 -06:00
TestTest.cpp Change preprocessor indent rules. 2016-01-29 22:22:37 -06:00
TestTestList.cpp Add uncrustify config and run first pass. 2016-01-29 22:15:10 -06:00
TestTestMacros.cpp Tweak preprocessor blocks. 2016-01-29 22:48:36 -06:00
TestTestResults.cpp Add uncrustify config and run first pass. 2016-01-29 22:15:10 -06:00
TestTestRunner.cpp Add uncrustify config and run first pass. 2016-01-29 22:15:10 -06:00
TestTestSuite.cpp Add uncrustify config and run first pass. 2016-01-29 22:15:10 -06:00
TestTimeConstraint.cpp Add uncrustify config and run first pass. 2016-01-29 22:15:10 -06:00
TestTimeConstraintMacro.cpp Add uncrustify config and run first pass. 2016-01-29 22:15:10 -06:00
TestUnitTestPP.cpp Change preprocessor indent rules. 2016-01-29 22:22:37 -06:00
TestXmlTestReporter.cpp Change preprocessor indent rules. 2016-01-29 22:22:37 -06:00