the Compartmented Robust Posix C++ Unit Test system

ALL_TESTS(testsuitename)

Dependency accessor for a whole testsuite.

Used in: a DEPENDS_ON(...) modifier for either a TEST(name, ...) or a TESTSUITE(name, ...).

Example: The test program

     
     #include <crpcut.hpp>
     
     TESTSUITE(partial)
     {
       TEST(success_by_nothing) { }
     
       TEST(fail) { FAIL << "oops"; }
     }
     
     TESTSUITE(full)
     {
       TEST(success_by_nothing) {}
     }
     
     TEST(failed_depend, DEPENDS_ON(ALL_TESTS(partial)))
     {
       // do nothing
     }
     
     TEST(successful_depend, DEPENDS_ON(ALL_TESTS(full)))
     {
       // do nothing
     }
     
     int main(int argc, char *argv[])
     {
       return crpcut::run(argc, argv);
     }

reports one test that has not run:


     FAILED: partial::fail
     phase="running"  --------------------------------------------------------------
     /home/bjorn/devel/crpcut/doc-src/samples/all_tests.cpp:34
     oops
     -------------------------------------------------------------------------------
     ===============================================================================
     The following tests were blocked from running:
       failed_depend
     Total 5 test cases selected
     UNTESTED : 1
     PASSED   : 3
     FAILED   : 1