diff --git a/doc/examples/dataset_example63.cpp b/doc/examples/dataset_example63.cpp index e951bd8f..f2921c82 100644 --- a/doc/examples/dataset_example63.cpp +++ b/doc/examples/dataset_example63.cpp @@ -32,6 +32,6 @@ BOOST_DATA_TEST_CASE( { std::cout << "test 2: " << random_sample << ", " << index << std::endl; - BOOST_CHECK(random_sample < 1.7); // 30% chance of failure + BOOST_TEST(random_sample < 1.7); // 30% chance of failure } //] diff --git a/doc/examples/decorator_00.cpp b/doc/examples/decorator_00.cpp index fff5ba5a..a0d7d284 100644 --- a/doc/examples/decorator_00.cpp +++ b/doc/examples/decorator_00.cpp @@ -13,7 +13,7 @@ namespace utf = boost::unit_test; namespace data = boost::unit_test::data; -BOOST_TEST_DECORATOR(*utf::description("with description")) +BOOST_TEST_DECORATOR(* utf::description("with description")) BOOST_DATA_TEST_CASE(test_1, data::xrange(4)) { BOOST_TEST(true); diff --git a/doc/examples/decorator_01.cpp b/doc/examples/decorator_01.cpp index c6f35c3c..6d83a81b 100644 --- a/doc/examples/decorator_01.cpp +++ b/doc/examples/decorator_01.cpp @@ -10,7 +10,7 @@ #include namespace utf = boost::unit_test; -BOOST_AUTO_TEST_CASE(test_case1, *utf::label("trivial")) +BOOST_AUTO_TEST_CASE(test_case1, * utf::label("trivial")) { BOOST_TEST(true); } diff --git a/doc/examples/decorator_02.cpp b/doc/examples/decorator_02.cpp index cde476fb..bb3c870c 100644 --- a/doc/examples/decorator_02.cpp +++ b/doc/examples/decorator_02.cpp @@ -10,7 +10,7 @@ #include namespace utf = boost::unit_test; -BOOST_AUTO_TEST_SUITE(suite1, *utf::label("trivial")) +BOOST_AUTO_TEST_SUITE(suite1, * utf::label("trivial")) BOOST_AUTO_TEST_CASE(test_case1) { diff --git a/doc/examples/decorator_03.cpp b/doc/examples/decorator_03.cpp index ce824992..c7e8e8ac 100644 --- a/doc/examples/decorator_03.cpp +++ b/doc/examples/decorator_03.cpp @@ -10,7 +10,7 @@ #include namespace utf = boost::unit_test; -BOOST_AUTO_TEST_SUITE(suite1, *utf::label("trivial")) +BOOST_AUTO_TEST_SUITE(suite1, * utf::label("trivial")) BOOST_AUTO_TEST_CASE(test_case1) { @@ -19,7 +19,7 @@ BOOST_AUTO_TEST_SUITE(suite1, *utf::label("trivial")) BOOST_AUTO_TEST_SUITE_END() -BOOST_AUTO_TEST_SUITE(suite1, *utf::label("simple")) +BOOST_AUTO_TEST_SUITE(suite1, * utf::label("simple")) BOOST_AUTO_TEST_CASE(test_case2) { diff --git a/doc/examples/decorator_05.cpp b/doc/examples/decorator_05.cpp index 06820da2..583b57d1 100644 --- a/doc/examples/decorator_05.cpp +++ b/doc/examples/decorator_05.cpp @@ -10,14 +10,14 @@ #include namespace utf = boost::unit_test; -BOOST_AUTO_TEST_SUITE(suite1, *utf::disabled()) +BOOST_AUTO_TEST_SUITE(suite1, * utf::disabled()) BOOST_AUTO_TEST_CASE(test1) { BOOST_TEST(1 != 1); } - BOOST_AUTO_TEST_CASE(test2, *utf::enabled()) + BOOST_AUTO_TEST_CASE(test2, * utf::enabled()) { BOOST_TEST(2 != 2); } diff --git a/doc/examples/decorator_07.cpp b/doc/examples/decorator_07.cpp index 5d865690..783a4448 100644 --- a/doc/examples/decorator_07.cpp +++ b/doc/examples/decorator_07.cpp @@ -13,17 +13,17 @@ namespace utf = boost::unit_test; // test1 and test2 defined at the bottom -BOOST_AUTO_TEST_CASE(test3, *utf::depends_on("s1/test1")) +BOOST_AUTO_TEST_CASE(test3, * utf::depends_on("s1/test1")) { BOOST_TEST(false); } -BOOST_AUTO_TEST_CASE(test4, *utf::depends_on("test3")) +BOOST_AUTO_TEST_CASE(test4, * utf::depends_on("test3")) { BOOST_TEST(false); } -BOOST_AUTO_TEST_CASE(test5, *utf::depends_on("s1/test2")) +BOOST_AUTO_TEST_CASE(test5, * utf::depends_on("s1/test2")) { BOOST_TEST(false); } @@ -35,7 +35,7 @@ BOOST_AUTO_TEST_SUITE(s1) BOOST_TEST(true); } - BOOST_AUTO_TEST_CASE(test2, *utf::disabled()) + BOOST_AUTO_TEST_CASE(test2, * utf::disabled()) { BOOST_TEST(false); } diff --git a/doc/examples/decorator_11.cpp b/doc/examples/decorator_11.cpp index 05df6ee2..8fdf98e6 100644 --- a/doc/examples/decorator_11.cpp +++ b/doc/examples/decorator_11.cpp @@ -10,7 +10,7 @@ #include namespace utf = boost::unit_test; -BOOST_AUTO_TEST_CASE(test1, *utf::timeout(2)) +BOOST_AUTO_TEST_CASE(test1, * utf::timeout(2)) { for(;;) {} BOOST_TEST(true); diff --git a/doc/examples/decorator_12.cpp b/doc/examples/decorator_12.cpp index 4c8743c3..b81b5c90 100644 --- a/doc/examples/decorator_12.cpp +++ b/doc/examples/decorator_12.cpp @@ -25,7 +25,7 @@ BOOST_AUTO_TEST_SUITE(suite1, * utf::fixture(std::string("FX")) * utf::fixture(std::string("FX2"))) - BOOST_AUTO_TEST_CASE(test1, *utf::fixture(&setup, &teardown)) + BOOST_AUTO_TEST_CASE(test1, * utf::fixture(&setup, &teardown)) { BOOST_TEST_MESSAGE("running test1"); BOOST_TEST(true); diff --git a/doc/examples/decorator_13.cpp b/doc/examples/decorator_13.cpp index 0f44cea3..51089334 100644 --- a/doc/examples/decorator_13.cpp +++ b/doc/examples/decorator_13.cpp @@ -12,33 +12,33 @@ namespace utf = boost::unit_test; namespace fpc = boost::test_tools::fpc; -BOOST_AUTO_TEST_CASE(test1, *utf::tolerance(0.0005)) +BOOST_AUTO_TEST_CASE(test1, * utf::tolerance(0.0005)) { BOOST_TEST( 0.001 == 0.000 ); BOOST_TEST( 1.100 == 1.101 ); } -BOOST_AUTO_TEST_CASE(test2, *utf::tolerance(0.005)) +BOOST_AUTO_TEST_CASE(test2, * utf::tolerance(0.005)) { BOOST_TEST( 0.001 == 0.000 ); BOOST_TEST( 1.100 == 1.101 ); } -BOOST_AUTO_TEST_CASE(test3, *utf::tolerance(0.05F)) +BOOST_AUTO_TEST_CASE(test3, * utf::tolerance(0.05F)) { BOOST_TEST( 0.001 == 0.000 ); BOOST_TEST( 1.100 == 1.101 ); } BOOST_AUTO_TEST_CASE(test4, - *utf::tolerance(fpc::percent_tolerance(0.05))) + * utf::tolerance(fpc::percent_tolerance(0.05))) { BOOST_TEST( 0.001 == 0.000 ); BOOST_TEST( 1.100 == 1.101 ); } BOOST_AUTO_TEST_CASE(test5, - *utf::tolerance(fpc::percent_tolerance(0.5))) + * utf::tolerance(fpc::percent_tolerance(0.5))) { BOOST_TEST( 0.001 == 0.000 ); BOOST_TEST( 1.100 == 1.101 ); diff --git a/doc/examples/decorator_20.cpp b/doc/examples/decorator_20.cpp index 217a9703..1be938fa 100644 --- a/doc/examples/decorator_20.cpp +++ b/doc/examples/decorator_20.cpp @@ -14,26 +14,26 @@ namespace utf = boost::unit_test; const bool io_implemented = true; const bool db_implemented = false; -BOOST_AUTO_TEST_SUITE(suite1, *utf::disabled()); +BOOST_AUTO_TEST_SUITE(suite1, * utf::disabled()); BOOST_AUTO_TEST_CASE(test_1) { BOOST_TEST(1 != 1); } - BOOST_AUTO_TEST_CASE(test_2, *utf::enabled()) + BOOST_AUTO_TEST_CASE(test_2, * utf::enabled()) { BOOST_TEST(2 != 2); } BOOST_AUTO_TEST_CASE(test_io, - *utf::enable_if()) + * utf::enable_if()) { BOOST_TEST(3 != 3); } BOOST_AUTO_TEST_CASE(test_db, - *utf::enable_if()) + * utf::enable_if()) { BOOST_TEST(4 != 4); } diff --git a/doc/examples/decorator_21.cpp b/doc/examples/decorator_21.cpp index 86812683..7999eaf0 100644 --- a/doc/examples/decorator_21.cpp +++ b/doc/examples/decorator_21.cpp @@ -25,13 +25,13 @@ BOOST_AUTO_TEST_CASE(test_1) } BOOST_AUTO_TEST_CASE(test_2, - *utf::depends_on("test_1")) + * utf::depends_on("test_1")) { BOOST_TEST(true); } BOOST_AUTO_TEST_CASE(test_3, - *utf::precondition(fail)) + * utf::precondition(fail)) { BOOST_TEST(true); } diff --git a/doc/examples/decorator_22.cpp b/doc/examples/decorator_22.cpp index d06af1df..770c5963 100644 --- a/doc/examples/decorator_22.cpp +++ b/doc/examples/decorator_22.cpp @@ -17,8 +17,8 @@ BOOST_AUTO_TEST_CASE(test_1) } BOOST_AUTO_TEST_CASE(test_net, - *utf::disabled() - *utf::description("requires network")) + * utf::disabled() + * utf::description("requires network")) { BOOST_TEST(true); } diff --git a/doc/examples/decorator_23.cpp b/doc/examples/decorator_23.cpp index f318aba4..79f6aa62 100644 --- a/doc/examples/decorator_23.cpp +++ b/doc/examples/decorator_23.cpp @@ -17,7 +17,7 @@ BOOST_AUTO_TEST_CASE(test_1) } BOOST_AUTO_TEST_CASE(test_net, - *utf::description("requires network")) + * utf::description("requires network")) { BOOST_TEST(true); } diff --git a/doc/examples/example01.cpp b/doc/examples/example01.cpp index bbc8753b..aa5dd06d 100644 --- a/doc/examples/example01.cpp +++ b/doc/examples/example01.cpp @@ -11,7 +11,7 @@ using namespace boost::unit_test; void free_test_function() { - BOOST_CHECK( true /* test assertion */ ); + BOOST_TEST( true /* test assertion */ ); } test_suite* init_unit_test_suite( int argc, char* argv[] ) diff --git a/doc/examples/example02.cpp b/doc/examples/example02.cpp index 7f0a5a4b..c4a49fd2 100644 --- a/doc/examples/example02.cpp +++ b/doc/examples/example02.cpp @@ -15,7 +15,7 @@ class test_class public: void test_method() { - BOOST_CHECK( true /* test assertion */ ); + BOOST_TEST( false /* test assertion */ ); } } tester; diff --git a/doc/examples/example02.output b/doc/examples/example02.output index b2ac15a1..1e1dcfa7 100644 --- a/doc/examples/example02.output +++ b/doc/examples/example02.output @@ -1,7 +1,7 @@ //[example_output > example Running 1 test case... -test.cpp(11): error in "boost::bind( &test_class::test_method, &tester )": check false failed +test.cpp(18): error: in "boost::bind( &test_class::test_method, &tester )": check false has failed -*** 1 failures is detected in test suite "Master Test Suite" +*** 1 failure is detected in the test module "Master Test Suite" //] diff --git a/doc/examples/example03.cpp b/doc/examples/example03.cpp index 57bb42f6..082f9b95 100644 --- a/doc/examples/example03.cpp +++ b/doc/examples/example03.cpp @@ -15,11 +15,11 @@ class test_class public: void test_method1() { - BOOST_CHECK( true /* test assertion */ ); + BOOST_TEST( true /* test assertion */ ); } void test_method2() { - BOOST_CHECK( false /* test assertion */ ); + BOOST_TEST( false /* test assertion */ ); } }; diff --git a/doc/examples/example03.output b/doc/examples/example03.output index ea141c9f..c6f54b6a 100644 --- a/doc/examples/example03.output +++ b/doc/examples/example03.output @@ -1,7 +1,7 @@ //[example_output > example Running 2 test cases... -test.cpp(15): error in "boost::bind( &test_class::test_method2, tester )": check false failed +test.cpp(22): error: in "boost::bind( &test_class::test_method2, tester )": check false has failed -*** 1 failures is detected in test suite "Master Test Suite" +*** 1 failure is detected in the test module "Master Test Suite" //] \ No newline at end of file diff --git a/doc/examples/example04.cpp b/doc/examples/example04.cpp index aaef2a01..788fbbfd 100644 --- a/doc/examples/example04.cpp +++ b/doc/examples/example04.cpp @@ -15,7 +15,7 @@ class test_class public: void test_method() { - BOOST_CHECK( true /* test assertion */ ); + BOOST_TEST( true /* test assertion */ ); } }; diff --git a/doc/examples/example05.cpp b/doc/examples/example05.cpp index 26441984..f41aceed 100644 --- a/doc/examples/example05.cpp +++ b/doc/examples/example05.cpp @@ -13,7 +13,7 @@ using namespace boost::unit_test; void free_test_function( int i, int j ) { - BOOST_CHECK( true /* test assertion */ ); + BOOST_TEST( true /* test assertion */ ); } bool init_function() diff --git a/doc/examples/example06.cpp b/doc/examples/example06.cpp index d258caf6..aa501646 100644 --- a/doc/examples/example06.cpp +++ b/doc/examples/example06.cpp @@ -11,6 +11,6 @@ BOOST_AUTO_TEST_CASE( free_test_function ) { - BOOST_CHECK( true /* test assertion */ ); + BOOST_TEST( true /* test assertion */ ); } //] diff --git a/doc/examples/example07.cpp b/doc/examples/example07.cpp index 92f6310c..0433a697 100644 --- a/doc/examples/example07.cpp +++ b/doc/examples/example07.cpp @@ -12,7 +12,7 @@ using namespace boost::unit_test; void free_test_function( int i ) { - BOOST_CHECK( i < 4 /* test assertion */ ); + BOOST_TEST( i < 4 /* test assertion */ ); } test_suite* init_unit_test_suite( int argc, char* argv[] ) diff --git a/doc/examples/example07.output b/doc/examples/example07.output index 64d403fc..edc68f66 100644 --- a/doc/examples/example07.output +++ b/doc/examples/example07.output @@ -1,8 +1,8 @@ //[example_output > example Running 5 test cases... -test.cpp(9): error in "free_test_function": check i < 4 failed -test.cpp(9): error in "free_test_function": check i < 4 failed +test.cpp(15): error: in "free_test_function": check i < 4 has failed [4 >= 4] +test.cpp(15): error: in "free_test_function": check i < 4 has failed [5 >= 4] -*** 2 failures are detected in test suite "Master Test Suite" +*** 2 failures are detected in the test module "Master Test Suite" //] \ No newline at end of file diff --git a/doc/examples/example08.cpp b/doc/examples/example08.cpp index 4c5a4f57..8dbf7b6f 100644 --- a/doc/examples/example08.cpp +++ b/doc/examples/example08.cpp @@ -12,14 +12,15 @@ #include #include using namespace boost::unit_test; +namespace tt=boost::test_tools; using namespace boost; class test_class { public: - void test_method( double const& d ) + void test_method( double d ) { - BOOST_CHECK_CLOSE( d * 100, (double)(int)(d*100), 0.01 ); + BOOST_TEST( d * 100 == (double)(int)(d*100), tt::tolerance(0.01) ); } } tester; @@ -27,10 +28,10 @@ bool init_unit_test() { double params[] = { 1., 1.1, 1.01, 1.001, 1.0001 }; - callback1 tm = bind( &test_class::test_method, &tester, _1); + boost::function test_method = bind( &test_class::test_method, &tester, _1); framework::master_test_suite(). - add( BOOST_PARAM_TEST_CASE( tm, params, params+5 ) ); + add( BOOST_PARAM_TEST_CASE( test_method, params, params+5 ) ); return true; } diff --git a/doc/examples/example08.output b/doc/examples/example08.output index a01c8c30..498bc3e0 100644 --- a/doc/examples/example08.output +++ b/doc/examples/example08.output @@ -1,8 +1,8 @@ //[example_output > example Running 5 test cases... -test.cpp(14): error in "tm": difference between d * 100{100.1} and (double)(int)(d*100){100} exceeds 0.01% -test.cpp(14): error in "tm": difference between d * 100{100.01} and (double)(int)(d*100){100} exceeds 0.01% +test.cpp(23): error: in "test_method": check d * 100 == (double)(int)(d*100) has failed [1.0001 * 100 != 100]. Relative difference exceeds tolerance [0.001 > 0.0001] +test.cpp(23): error: in "test_method": check d * 100 == (double)(int)(d*100) has failed [1.0001 * 100 != 100]. Relative difference exceeds tolerance [0.0001 > 0.0001] -*** 2 failures are detected in test suite "Master Test Suite" +*** 2 failures are detected in the test module "Master Test Suite" //] \ No newline at end of file diff --git a/doc/examples/example09.cpp b/doc/examples/example09.cpp index 9a1ba30e..dd23262d 100644 --- a/doc/examples/example09.cpp +++ b/doc/examples/example09.cpp @@ -12,7 +12,7 @@ using namespace boost::unit_test; BOOST_TEST_CASE_TEMPLATE_FUNCTION( my_test, T ) { - BOOST_CHECK_EQUAL( sizeof(T), 4 ); + BOOST_TEST( sizeof(T) == 4 ); } test_suite* init_unit_test_suite( int argc, char* argv[] ) diff --git a/doc/examples/example09.output b/doc/examples/example09.output index 1f28a0f6..42a36b7c 100644 --- a/doc/examples/example09.output +++ b/doc/examples/example09.output @@ -1,7 +1,7 @@ //[example_output > example Running 3 test cases... -test.cpp(10): error in "my_test": check sizeof(T) == 4 failed [1 != 4] +test.cpp(15): error: in "my_test": check sizeof(T) == 4 has failed [1 != 4] -*** 1 failures is detected in test suite "Master Test Suite" +*** 1 failure is detected in the test module "Master Test Suite" //] \ No newline at end of file diff --git a/doc/examples/example10.cpp b/doc/examples/example10.cpp index 29e766bd..f42c2d96 100644 --- a/doc/examples/example10.cpp +++ b/doc/examples/example10.cpp @@ -14,6 +14,6 @@ typedef boost::mpl::list test_types; BOOST_AUTO_TEST_CASE_TEMPLATE( my_test, T, test_types ) { - BOOST_CHECK_EQUAL( sizeof(T), (unsigned)4 ); + BOOST_TEST( sizeof(T) == (unsigned)4 ); } //] diff --git a/doc/examples/example10.output b/doc/examples/example10.output index 5165e46a..75b9e297 100644 --- a/doc/examples/example10.output +++ b/doc/examples/example10.output @@ -1,7 +1,7 @@ //[example_output > example Running 3 test cases... -test.cpp(12): error in "my_test": check sizeof(T) == 4 failed [1 != 4] +test.cpp(17): error: in "my_test": check sizeof(T) == (unsigned)4 has failed [1 != 4] -*** 1 failures is detected in test suite "example" +*** 1 failure is detected in the test module "example" //] \ No newline at end of file diff --git a/doc/examples/example12.cpp b/doc/examples/example12.cpp index 9f5ea49d..8d055b2a 100644 --- a/doc/examples/example12.cpp +++ b/doc/examples/example12.cpp @@ -13,12 +13,12 @@ BOOST_AUTO_TEST_SUITE( test_suite1 ) BOOST_AUTO_TEST_CASE( test_case1 ) { - BOOST_WARN( sizeof(int) < 4 ); + BOOST_TEST_WARN( sizeof(int) < 4 ); } BOOST_AUTO_TEST_CASE( test_case2 ) { - BOOST_REQUIRE_EQUAL( 1, 2 ); + BOOST_TEST_REQUIRE( 1 == 2 ); BOOST_FAIL( "Should never reach this line" ); } @@ -27,12 +27,12 @@ BOOST_AUTO_TEST_SUITE( test_suite2 ) BOOST_AUTO_TEST_CASE( test_case3 ) { - BOOST_CHECK( true ); + BOOST_TEST( true ); } BOOST_AUTO_TEST_CASE( test_case4 ) { - BOOST_CHECK( false ); + BOOST_TEST( false ); } BOOST_AUTO_TEST_SUITE_END() diff --git a/doc/examples/example12.output b/doc/examples/example12.output index b2e2b8ce..ec432787 100644 --- a/doc/examples/example12.output +++ b/doc/examples/example12.output @@ -1,8 +1,8 @@ //[example_output > example Running 4 test cases... -test.cpp(12): fatal error in "test_case2": critical check 1 == 2 failed [1 != 2] -test.cpp(27): error in "test_case4": check false failed +test.cpp(21): fatal error: in "test_suite1/test_case2": critical check 1 == 2 has failed [1 != 2] +test.cpp(35): error: in "test_suite2/test_case4": check false has failed -*** 2 failures are detected in test suite "example" +*** 2 failures are detected in the test module "example" //] \ No newline at end of file diff --git a/doc/examples/example13.cpp b/doc/examples/example13.cpp index c4977e95..3eb09496 100644 --- a/doc/examples/example13.cpp +++ b/doc/examples/example13.cpp @@ -11,7 +11,7 @@ using namespace boost::unit_test; void free_test_function() { - BOOST_CHECK( true /* test assertion */ ); + BOOST_TEST( true /* test assertion */ ); } test_suite* init_unit_test_suite( int argc, char* argv[] ) diff --git a/doc/examples/example14.cpp b/doc/examples/example14.cpp index 31e142e4..07359743 100644 --- a/doc/examples/example14.cpp +++ b/doc/examples/example14.cpp @@ -12,6 +12,6 @@ BOOST_AUTO_TEST_CASE( free_test_function ) { - BOOST_CHECK( true /* test assertion */ ); + BOOST_TEST( true /* test assertion */ ); } //] diff --git a/doc/examples/example15.cpp b/doc/examples/example15.cpp index 98d151fd..b211e0d6 100644 --- a/doc/examples/example15.cpp +++ b/doc/examples/example15.cpp @@ -12,7 +12,7 @@ using namespace boost::unit_test; BOOST_AUTO_TEST_CASE( free_test_function ) { - BOOST_CHECK( true /* test assertion */ ); + BOOST_TEST( true /* test assertion */ ); } test_suite* init_unit_test_suite( int argc, char* argv[] ) diff --git a/doc/examples/example16.cpp b/doc/examples/example16.cpp index 45c6badb..c715ee2a 100644 --- a/doc/examples/example16.cpp +++ b/doc/examples/example16.cpp @@ -11,7 +11,7 @@ using namespace boost::unit_test; void free_test_function() { - BOOST_CHECK( 2 == 1 ); + BOOST_TEST( 2 == 1 ); } test_suite* init_unit_test_suite( int, char* [] ) diff --git a/doc/examples/example16.output b/doc/examples/example16.output index 074016b8..30fa7c19 100644 --- a/doc/examples/example16.output +++ b/doc/examples/example16.output @@ -1,7 +1,7 @@ //[example_output > example --log_level=message Running 1 test case... -test.cpp(8): error in "free_test_function": check 2 == 1 failed +test.cpp(8): error in "free_test_function": check 2 == 1 has failed Test case has less failures then expected *** No errors detected diff --git a/doc/examples/example17.cpp b/doc/examples/example17.cpp index f6d16742..83261ecc 100644 --- a/doc/examples/example17.cpp +++ b/doc/examples/example17.cpp @@ -13,7 +13,7 @@ BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES( my_test1, 1 ) BOOST_AUTO_TEST_CASE( my_test1 ) { - BOOST_CHECK( 2 == 1 ); + BOOST_TEST( 2 == 1 ); } BOOST_AUTO_TEST_SUITE( internal ) diff --git a/doc/examples/example17.output b/doc/examples/example17.output index f23acc3a..b106d6b6 100644 --- a/doc/examples/example17.output +++ b/doc/examples/example17.output @@ -1,9 +1,9 @@ //[example_output > example --report_level=short Running 2 test cases... -test.cpp(10): error in "my_test1": check 2 == 1 failed -test.cpp(21): error in "my_test1": check sizeof(int) == sizeof(char) failed [4 != 1] -test.cpp(22): error in "my_test1": check sizeof(int*) == sizeof(char) failed [4 != 1] +test.cpp(10): error in "my_test1": check 2 == 1 has failed +test.cpp(21): error in "my_test1": check sizeof(int) == sizeof(char) has failed [4 != 1] +test.cpp(22): error in "my_test1": check sizeof(int*) == sizeof(char) has failed [4 != 1] Test suite "example" passed with: 3 assertions out of 3 failed diff --git a/doc/examples/example18.cpp b/doc/examples/example18.cpp index 77410649..9a8e3c84 100644 --- a/doc/examples/example18.cpp +++ b/doc/examples/example18.cpp @@ -18,7 +18,7 @@ struct F { BOOST_FIXTURE_TEST_CASE( test_case1, F ) { - BOOST_CHECK( i == 1 ); + BOOST_TEST( i == 1 ); ++i; } @@ -29,6 +29,6 @@ BOOST_FIXTURE_TEST_CASE( test_case2, F ) BOOST_AUTO_TEST_CASE( test_case3 ) { - BOOST_CHECK( true ); + BOOST_TEST( true ); } //] diff --git a/doc/examples/example18.output b/doc/examples/example18.output index 94ccd710..2fbe3d8c 100644 --- a/doc/examples/example18.output +++ b/doc/examples/example18.output @@ -2,10 +2,10 @@ > example --log_level=message Running 3 test cases... setup fixture -test.cpp(13): error in "test_case1": check i == 1 failed +test.cpp(13): error in "test_case1": check i == 1 has failed teardown fixture setup fixture -test.cpp(19): error in "test_case2": check i == 1 failed [0 != 1] +test.cpp(19): error in "test_case2": check i == 1 has failed [0 != 1] teardown fixture *** 2 failures are detected in test suite "example" diff --git a/doc/examples/example20.cpp b/doc/examples/example20.cpp index 3f056127..a92ca000 100644 --- a/doc/examples/example20.cpp +++ b/doc/examples/example20.cpp @@ -23,6 +23,6 @@ BOOST_GLOBAL_FIXTURE( MyConfig ); BOOST_AUTO_TEST_CASE( test_case ) { - BOOST_CHECK( true ); + BOOST_TEST( true ); } //] diff --git a/doc/examples/example27.cpp b/doc/examples/example27.cpp index 1487a6d0..65c0f081 100644 --- a/doc/examples/example27.cpp +++ b/doc/examples/example27.cpp @@ -19,7 +19,7 @@ int test_main( int, char *[] ) // note the name! // six ways to detect and report the same error: // continues on error - BOOST_CHECK( add( 2,2 ) == 4 ); /*< + BOOST_TEST( add( 2,2 ) == 4 ); /*< This approach uses the `BOOST_CHECK` tool, which displays an error message on std::cout that includes the expression that failed, the source file name, and the source file line number. It also increments the error count. At program termination, the error count will be displayed automatically by the __MTF__. diff --git a/doc/examples/example28.cpp b/doc/examples/example28.cpp index e131f022..55d36abb 100644 --- a/doc/examples/example28.cpp +++ b/doc/examples/example28.cpp @@ -16,8 +16,8 @@ BOOST_AUTO_TEST_CASE( test ) output_test_stream output; int i=2; output << "i=" << i; - BOOST_CHECK( !output.is_empty( false ) ); - BOOST_CHECK( output.check_length( 3, false ) ); - BOOST_CHECK( output.is_equal( "i=3" ) ); + BOOST_TEST( !output.is_empty( false ) ); + BOOST_TEST( output.check_length( 3, false ) ); + BOOST_TEST( output.is_equal( "i=3" ) ); } //] diff --git a/doc/examples/example28.output b/doc/examples/example28.output index 242984ef..15a1369e 100644 --- a/doc/examples/example28.output +++ b/doc/examples/example28.output @@ -1,7 +1,7 @@ //[example_output > example Running 1 test case... -test.cpp(15): error in "test": check output.is_equal( "i=3" ) failed. Output content: "i=2" +test.cpp(15): error in "test": check output.is_equal( "i=3" ) has failed. Output content: "i=2" *** 1 failures is detected in test suite "example" //] \ No newline at end of file diff --git a/doc/examples/example29.cpp b/doc/examples/example29.cpp index dd980eeb..39902e0c 100644 --- a/doc/examples/example29.cpp +++ b/doc/examples/example29.cpp @@ -16,9 +16,9 @@ BOOST_AUTO_TEST_CASE( test ) output_test_stream output( "pattern_file", true ); int i=2; output << "i=" << i; - BOOST_CHECK( output.match_pattern() ); + BOOST_TEST( output.match_pattern() ); output << "\nFile: " << __FILE__ << " Line:YYY"; - BOOST_CHECK( output.match_pattern() ); /*< This line generates the error Line:YYY != Line:XXX >*/ + BOOST_TEST( output.match_pattern() ); /*< This line generates the error Line:YYY != Line:XXX >*/ } //] diff --git a/doc/examples/example29.output b/doc/examples/example29.output index 43f8b7f6..8193fa65 100644 --- a/doc/examples/example29.output +++ b/doc/examples/example29.output @@ -1,7 +1,7 @@ //[example_output > example Running 1 test case... -test.cpp(16): error in "test": check output.match_pattern() failed. Mismatch at position 23 +test.cpp(16): error in "test": check output.match_pattern() has failed. Mismatch at position 23 ...5... ...4... diff --git a/doc/examples/example30.output b/doc/examples/example30.output index d42660a9..79f995d6 100644 --- a/doc/examples/example30.output +++ b/doc/examples/example30.output @@ -1,7 +1,7 @@ //[example_output > example Running 1 test case... -test.cpp(13): error in "test_is_even": check is_even( i ) failed for ( 17 ) +test.cpp(13): error in "test_is_even": check is_even( i ) has failed for ( 17 ) *** 1 failures is detected in test suite "example" //] \ No newline at end of file diff --git a/doc/examples/example31.cpp b/doc/examples/example31.cpp index a0efa427..309b9be3 100644 --- a/doc/examples/example31.cpp +++ b/doc/examples/example31.cpp @@ -29,6 +29,6 @@ BOOST_AUTO_TEST_CASE( test_list_comparison ) l1.push_back( 1 ); l1.push_back( 2 ); - BOOST_CHECK( compare_lists( l1, l2 ) ); + BOOST_TEST( compare_lists( l1, l2 ) ); } //] diff --git a/doc/examples/example31.output b/doc/examples/example31.output index 11f2a89b..e1ba2904 100644 --- a/doc/examples/example31.output +++ b/doc/examples/example31.output @@ -1,6 +1,6 @@ //[example_output Running 1 test case... -test.cpp(28): error in "test_list_comparizon": check compare_lists( l1, l2 ) failed. Different sizes [2!=0] +test.cpp(28): error in "test_list_comparizon": check compare_lists( l1, l2 ) has failed. Different sizes [2!=0] *** 1 failures is detected in test suite "example" //] \ No newline at end of file diff --git a/doc/examples/example32.output b/doc/examples/example32.output index ccf4d271..f835e340 100644 --- a/doc/examples/example32.output +++ b/doc/examples/example32.output @@ -1,6 +1,6 @@ //[example_output Running 1 test case... -test.cpp(16): error in "test_list": check p1 == p2 failed [ != ] +test.cpp(16): error in "test_list": check p1 == p2 has failed [ != ] *** 1 failures is detected in test suite "example" //] \ No newline at end of file diff --git a/doc/examples/example34.output b/doc/examples/example34.output index 5e2d9643..f7e1d93c 100644 --- a/doc/examples/example34.output +++ b/doc/examples/example34.output @@ -2,8 +2,8 @@ > example --log_level=warning Running 1 test case... test.cpp(9): warning in "test": condition sizeof(int) == sizeof(short) is not satisfied -test.cpp(10): error in "test": check i == 1 failed -test.cpp(11): fatal error in "test": critical check i > 5 failed +test.cpp(10): error in "test": check i == 1 has failed +test.cpp(11): fatal error in "test": critical check i > 5 has failed *** 2 failures are detected in test suite "example" //] \ No newline at end of file diff --git a/doc/examples/example35.output b/doc/examples/example35.output index 17dbed6b..4658b75c 100644 --- a/doc/examples/example35.output +++ b/doc/examples/example35.output @@ -1,7 +1,7 @@ //[example_output > example Running 1 test case... -test.cpp(10): fatal error in "test": critical check i == j failed [2 != 1] +test.cpp(10): fatal error in "test": critical check i == j has failed [2 != 1] *** 1 failures is detected in test suite "example" //] \ No newline at end of file diff --git a/doc/examples/example36.output b/doc/examples/example36.output index 18a09327..c94d420f 100644 --- a/doc/examples/example36.output +++ b/doc/examples/example36.output @@ -1,7 +1,7 @@ //[example_output > example Running 1 test case... -test.cpp(11): error in "test": check { col1, col1+7 } == { col2, col2+7 } failed. +test.cpp(11): error in "test": check { col1, col1+7 } == { col2, col2+7 } has failed. Mismatch in a position 2: 3 != 4 Mismatch in a position 5: 6 != 7 diff --git a/doc/examples/example48.cpp b/doc/examples/example48.cpp index e741638a..8a53d61f 100644 --- a/doc/examples/example48.cpp +++ b/doc/examples/example48.cpp @@ -11,7 +11,7 @@ BOOST_AUTO_TEST_CASE( test ) { - BOOST_CHECK( BOOST_IS_DEFINED(SYMBOL1) ); - BOOST_CHECK( BOOST_IS_DEFINED(SYMBOL2(arg)) ); + BOOST_TEST( BOOST_IS_DEFINED(SYMBOL1) ); + BOOST_TEST( BOOST_IS_DEFINED(SYMBOL2(arg)) ); } //] diff --git a/doc/examples/example49.cpp b/doc/examples/example49.cpp index ac9b8b96..ff2dcf26 100644 --- a/doc/examples/example49.cpp +++ b/doc/examples/example49.cpp @@ -11,7 +11,7 @@ using namespace boost::unit_test; void free_test_function() { - BOOST_CHECK( true /* test assertion */ ); + BOOST_TEST( true /* test assertion */ ); } test_suite* init_unit_test_suite( int argc, char* argv[] ) diff --git a/doc/examples/example50.cpp b/doc/examples/example50.cpp index 7cc68cb4..e3830744 100644 --- a/doc/examples/example50.cpp +++ b/doc/examples/example50.cpp @@ -28,7 +28,7 @@ BOOST_GLOBAL_FIXTURE( MyConfig ); BOOST_AUTO_TEST_CASE( test_case ) { - BOOST_CHECK( false ); + BOOST_TEST( false ); } //] diff --git a/doc/examples/example52.cpp b/doc/examples/example52.cpp index 96cfb4ef..697c11dc 100644 --- a/doc/examples/example52.cpp +++ b/doc/examples/example52.cpp @@ -22,6 +22,6 @@ BOOST_GLOBAL_FIXTURE( MyConfig ); BOOST_AUTO_TEST_CASE( test_case0 ) { - BOOST_CHECK( false ); + BOOST_TEST( false ); } //] diff --git a/doc/examples/example53.cpp b/doc/examples/example53.cpp index 48d797d9..d50a8b7b 100644 --- a/doc/examples/example53.cpp +++ b/doc/examples/example53.cpp @@ -21,7 +21,7 @@ BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_CASE( test_case_on_file_scope ) { - BOOST_CHECK( true ); + BOOST_TEST( true ); } BOOST_AUTO_TEST_SUITE( test_suite ) diff --git a/doc/examples/fixture_03.cpp b/doc/examples/fixture_03.cpp index c5778224..18ab3fa6 100644 --- a/doc/examples/fixture_03.cpp +++ b/doc/examples/fixture_03.cpp @@ -15,7 +15,7 @@ struct F { ~F() { BOOST_TEST_MESSAGE( "teardown fixture" ); } }; -BOOST_AUTO_TEST_SUITE(s, *utf::fixture()) +BOOST_AUTO_TEST_SUITE(s, * utf::fixture()) BOOST_AUTO_TEST_CASE(test_case1) { diff --git a/doc/test_organization/decorators.qbk b/doc/test_organization/decorators.qbk index db7d2946..80a2b80e 100644 --- a/doc/test_organization/decorators.qbk +++ b/doc/test_organization/decorators.qbk @@ -7,10 +7,9 @@ [section:decorators Decorators] -Decorators is a mechanism for attaching various pieces of information to test units in a uniform manner. These pieces -of information affect how the test tree is processed during the execution of the program. They range from test unit -descriptions to floating-point tolerance or the number of expected failures. They are listed in detail in the following -sections. +Decorator is a mechanism for updating various test unit attributes in a uniform manner. These atributes affect how the +test tree is processed during the execution of the program. They range from test unit descriptions to floating-point +tolerance or the number of expected failures. They are listed in detail in the following sections. A list of decorators can be associated with a given test case by providing the second argument to macro __BOOST_AUTO_TEST_CASE__ or the third argument to macro __BOOST_FIXTURE_TEST_CASE__. Similarly, a list of decorators @@ -140,7 +139,7 @@ BOOST_DATA_TEST_CASE(test_case, data, var) // not doable ```][``` BOOST_TEST_DECORATOR(*decor1() *decor2()) -__BOOST_AUTO_TEST_CASE_TEMPLATE__(test_case, T, type_list) +BOOST_AUTO_TEST_CASE_TEMPLATE(test_case, T, type_list) { // assertions } diff --git a/test/single_header_test.cpp b/test/single_header_test.cpp index d87f2bcd..2cbde7ac 100644 --- a/test/single_header_test.cpp +++ b/test/single_header_test.cpp @@ -1,18 +1,27 @@ -// (C) Copyright Raffi Enficiaud 2014. +// (C) Copyright Gennadiy Rozental 2001-2014. // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. +// +// File : $RCSfile$ +// +// Version : $Revision$ +// +// Description : included Test Execution Monitor test +// *************************************************************************** -//[example_code -#define BOOST_TEST_MODULE boost_test_message +// Boost.Test +#define BOOST_TEST_MAIN #include -BOOST_AUTO_TEST_CASE( test_message ) +BOOST_AUTO_TEST_CASE( test ) { - const int a(1), b(2); - BOOST_TEST(a == b, "a should be equal to b: " << a << "!=" << b); - BOOST_TEST(a != 10, "value of a=" << a); + int i = 1; + BOOST_CHECK_EQUAL( i*i, 1 ); } -//] + +//____________________________________________________________________________// + +// EOF