From a41aeac197422583bdd2cf49b776841b9fa5ddd2 Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Thu, 1 Mar 2001 00:47:19 +0000 Subject: [PATCH] Add Test Library regression tests [SVN r9369] --- example/test_tools_example.cpp | 1 + test/test_tools_fail1.cpp | 3 ++- test/test_tools_fail2.cpp | 2 ++ test/test_tools_fail3.cpp | 3 ++- test/test_tools_fail4.cpp | 1 + 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/example/test_tools_example.cpp b/example/test_tools_example.cpp index 52dc522b..bb9fc5f1 100644 --- a/example/test_tools_example.cpp +++ b/example/test_tools_example.cpp @@ -1,5 +1,6 @@ // boost test_main example program ----------------------------------------// +#define BOOST_INCLUDE_MAIN // for testing, include rather than link #include int add( int i, int j ) { return i+j; } diff --git a/test/test_tools_fail1.cpp b/test/test_tools_fail1.cpp index daedf8ce..d9905a06 100644 --- a/test/test_tools_fail1.cpp +++ b/test/test_tools_fail1.cpp @@ -9,7 +9,8 @@ // 7 Nov 00 Initial boost version (Beman Dawes) // While it would appear that including boost/test_tools.hpp is unneeded, -// it is useful in the case that BOOST_INCLUDE_MAIN is defined. +// it is useful because BOOST_INCLUDE_MAIN is defined. +#define BOOST_INCLUDE_MAIN // for testing, include rather than link #include int test_main( int, char *[] ) // note the name diff --git a/test/test_tools_fail2.cpp b/test/test_tools_fail2.cpp index ffb5a163..bc997dfd 100644 --- a/test/test_tools_fail2.cpp +++ b/test/test_tools_fail2.cpp @@ -8,12 +8,14 @@ // Revision History // 7 Nov 00 Initial boost version (Beman Dawes) +#define BOOST_INCLUDE_MAIN // for testing, include rather than link #include int test_main( int, char *[] ) // note the name { int v = 1; BOOST_TEST( v == 2 ); + BOOST_ERROR( "sample BOOST_ERROR call" ); BOOST_CRITICAL_TEST( 2 == v ); throw "Opps! should never reach this point"; return 1; diff --git a/test/test_tools_fail3.cpp b/test/test_tools_fail3.cpp index 2399e934..fc34753c 100644 --- a/test/test_tools_fail3.cpp +++ b/test/test_tools_fail3.cpp @@ -1,4 +1,4 @@ -// test tools - test failure reported by BOOST_TEST_VERIFY -----------------// +// test tools - test failure reported by BOOST_TEST ------------------------// // (C) Copyright Beman Dawes 2000. Permission to copy, use, modify, sell and // distribute this software is granted provided this copyright notice appears @@ -8,6 +8,7 @@ // Revision History // 7 Nov 00 Initial boost version (Beman Dawes) +#define BOOST_INCLUDE_MAIN // for testing, include rather than link #include int test_main( int, char *[] ) // note the name diff --git a/test/test_tools_fail4.cpp b/test/test_tools_fail4.cpp index a1169741..00a82713 100644 --- a/test/test_tools_fail4.cpp +++ b/test/test_tools_fail4.cpp @@ -8,6 +8,7 @@ // Revision History // 8 Feb 01 Initial boost version (Beman Dawes) +#define BOOST_INCLUDE_MAIN // for testing, include rather than link #include int test_main( int, char *[] ) // note the name