annotate tests/x_expected.cpp @ 0:d098192f01d9

Initial commit to the repository.
author Brian Neal <bgneal@gmail.com>
date Sat, 19 Mar 2011 19:53:12 -0500
parents
children
rev   line source
bgneal@0 1 #include "x1.h"
bgneal@0 2 #include "x2.h"
bgneal@0 3 #include "x3.h"
bgneal@0 4
bgneal@0 5 #include <stdlib.h>
bgneal@0 6
bgneal@0 7 int main(int argc, char* argv[])
bgneal@0 8 {
bgneal@0 9 int retval = EXIT_SUCCESS;
bgneal@0 10
bgneal@0 11 {
bgneal@0 12 sample_test sample_test_instance;
bgneal@0 13 sample_test_instance.add_test("test42", &sample_test::test42);
bgneal@0 14 sample_test_instance.add_test("testbeast", &sample_test::testbeast);
bgneal@0 15 sample_test_instance.add_test("testfivealive", &sample_test::testfivealive);
bgneal@0 16 const int r = sample_test_instance.run(argc, argv);
bgneal@0 17 retval = retval == EXIT_SUCCESS ? r : EXIT_FAILURE;
bgneal@0 18 }
bgneal@0 19 {
bgneal@0 20 misc_tests misc_tests_instance;
bgneal@0 21 misc_tests_instance.add_test("testexceptions", &misc_tests::testexceptions);
bgneal@0 22 misc_tests_instance.add_test("testloopdata", &misc_tests::testloopdata);
bgneal@0 23 misc_tests_instance.add_test("testfloatingpoint", &misc_tests::testfloatingpoint);
bgneal@0 24 const int r = misc_tests_instance.run(argc, argv);
bgneal@0 25 retval = retval == EXIT_SUCCESS ? r : EXIT_FAILURE;
bgneal@0 26 }
bgneal@0 27 {
bgneal@0 28 exception_test exception_test_instance;
bgneal@0 29 exception_test_instance.add_test("test_array_bounds", &exception_test::test_array_bounds);
bgneal@0 30 exception_test_instance.add_test("test_should_catch_std_exceptions", &exception_test::test_should_catch_std_exceptions);
bgneal@0 31 const int r = exception_test_instance.run(argc, argv);
bgneal@0 32 retval = retval == EXIT_SUCCESS ? r : EXIT_FAILURE;
bgneal@0 33 }
bgneal@0 34 {
bgneal@0 35 MyTest MyTest_instance;
bgneal@0 36 MyTest_instance.add_test("testIt", &MyTest::testIt);
bgneal@0 37 const int r = MyTest_instance.run(argc, argv);
bgneal@0 38 retval = retval == EXIT_SUCCESS ? r : EXIT_FAILURE;
bgneal@0 39 }
bgneal@0 40
bgneal@0 41 return retval;
bgneal@0 42 }