|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81321 - in trunk/libs/test/test: . test_files
From: gennadiy.rozental_at_[hidden]
Date: 2012-11-13 07:53:55
Author: rogeeff
Date: 2012-11-13 07:53:54 EST (Tue, 13 Nov 2012)
New Revision: 81321
URL: http://svn.boost.org/trac/boost/changeset/81321
Log:
self test updated
Text files modified:
trunk/libs/test/test/parameterized_test_test.cpp | 5 --
trunk/libs/test/test/result_report_test.cpp | 16 ++++--
trunk/libs/test/test/test_case_template_test.cpp | 6 --
trunk/libs/test/test/test_files/result_report_test.pattern | 89 ++++++++++++++++++++++++---------------
4 files changed, 65 insertions(+), 51 deletions(-)
Modified: trunk/libs/test/test/parameterized_test_test.cpp
==============================================================================
--- trunk/libs/test/test/parameterized_test_test.cpp (original)
+++ trunk/libs/test/test/parameterized_test_test.cpp 2012-11-13 07:53:54 EST (Tue, 13 Nov 2012)
@@ -18,13 +18,8 @@
#include <boost/test/parameterized_test.hpp>
#include <boost/test/unit_test_log.hpp>
#include <boost/test/results_collector.hpp>
-#if BOOST_WORKAROUND( __GNUC__, < 3 )
-#include <boost/test/output_test_stream.hpp>
-typedef boost::test_tools::output_test_stream onullstream_type;
-#else
#include <boost/test/utils/nullstream.hpp>
typedef boost::onullstream onullstream_type;
-#endif
namespace ut = boost::unit_test;
Modified: trunk/libs/test/test/result_report_test.cpp
==============================================================================
--- trunk/libs/test/test/result_report_test.cpp (original)
+++ trunk/libs/test/test/result_report_test.cpp 2012-11-13 07:53:54 EST (Tue, 13 Nov 2012)
@@ -22,12 +22,8 @@
#include <boost/test/unit_test_suite.hpp>
#include <boost/test/framework.hpp>
#include <boost/test/unit_test_parameters.hpp>
-#if BOOST_WORKAROUND( __GNUC__, < 3 )
-typedef boost::test_tools::output_test_stream onullstream_type;
-#else
#include <boost/test/utils/nullstream.hpp>
typedef boost::onullstream onullstream_type;
-#endif
// BOOST
#include <boost/lexical_cast.hpp>
@@ -42,6 +38,8 @@
void good_foo() {}
+void almost_good_foo() { BOOST_TEST_WARN( 2>3 ); }
+
void bad_foo() {
onullstream_type null_out;
unit_test_log.set_stream( null_out );
@@ -87,8 +85,8 @@
void check( output_test_stream& output, test_unit_id id )
{
- check( output, CLF, id );
- check( output, XML, id );
+ check( output, OF_CLF, id );
+ check( output, OF_XML, id );
}
//____________________________________________________________________________//
@@ -126,6 +124,9 @@
test_suite* ts_1b = BOOST_TEST_SUITE( "1 bad test case inside" );
ts_1b->add( BOOST_TEST_CASE( bad_foo ), 1 );
+ test_suite* ts_1c = BOOST_TEST_SUITE( "1 almost good test case inside" );
+ ts_1c->add( BOOST_TEST_CASE( almost_good_foo ) );
+
test_suite* ts_2 = BOOST_TEST_SUITE( "2 test cases inside" );
ts_2->add( BOOST_TEST_CASE( good_foo ) );
ts_2->add( BOOST_TEST_CASE( bad_foo ), 1 );
@@ -150,6 +151,9 @@
framework::run( ts_1b );
check( test_output, ts_1b->p_id );
+ framework::run( ts_1c );
+ check( test_output, ts_1c->p_id );
+
framework::run( ts_2 );
check( test_output, ts_2->p_id );
Modified: trunk/libs/test/test/test_case_template_test.cpp
==============================================================================
--- trunk/libs/test/test/test_case_template_test.cpp (original)
+++ trunk/libs/test/test/test_case_template_test.cpp 2012-11-13 07:53:54 EST (Tue, 13 Nov 2012)
@@ -17,14 +17,8 @@
#include <boost/test/unit_test.hpp>
#include <boost/test/unit_test_log.hpp>
#include <boost/test/results_collector.hpp>
-
-#if BOOST_WORKAROUND( __GNUC__, < 3 )
-#include <boost/test/output_test_stream.hpp>
-typedef boost::test_tools::output_test_stream onullstream_type;
-#else
#include <boost/test/utils/nullstream.hpp>
typedef boost::onullstream onullstream_type;
-#endif
// BOOST
#include <boost/mpl/range_c.hpp>
Modified: trunk/libs/test/test/test_files/result_report_test.pattern
==============================================================================
--- trunk/libs/test/test/test_files/result_report_test.pattern (original)
+++ trunk/libs/test/test/test_files/result_report_test.pattern 2012-11-13 07:53:54 EST (Tue, 13 Nov 2012)
@@ -13,76 +13,97 @@
Test case "good_foo" passed
*************************************************************************
-<TestResult><TestSuite name="1 test cases inside" result="passed" assertions_passed="0" assertions_failed="0" expected_failures="0" test_cases_passed="1" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"></TestSuite></TestResult>*************************************************************************
-<TestResult><TestSuite name="1 test cases inside" result="passed" assertions_passed="0" assertions_failed="0" expected_failures="0" test_cases_passed="1" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"></TestSuite></TestResult>*************************************************************************
-<TestResult><TestSuite name="1 test cases inside" result="passed" assertions_passed="0" assertions_failed="0" expected_failures="0" test_cases_passed="1" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"><TestCase name="good_foo" result="passed" assertions_passed="0" assertions_failed="0" expected_failures="0"></TestCase></TestSuite></TestResult>*************************************************************************
+<TestResult><TestSuite name="1 test cases inside" result="passed" assertions_passed="0" assertions_failed="0" warnings_failed="0" expected_failures="0" test_cases_passed="1" test_cases_passed_with_warnings="0" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"></TestSuite></TestResult>*************************************************************************
+<TestResult><TestSuite name="1 test cases inside" result="passed" assertions_passed="0" assertions_failed="0" warnings_failed="0" expected_failures="0" test_cases_passed="1" test_cases_passed_with_warnings="0" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"></TestSuite></TestResult>*************************************************************************
+<TestResult><TestSuite name="1 test cases inside" result="passed" assertions_passed="0" assertions_failed="0" warnings_failed="0" expected_failures="0" test_cases_passed="1" test_cases_passed_with_warnings="0" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"><TestCase name="good_foo" result="passed" assertions_passed="0" assertions_failed="0" warnings_failed="0" expected_failures="0"></TestCase></TestSuite></TestResult>*************************************************************************
*** No errors detected
*************************************************************************
Test suite "1 bad test case inside" passed with:
- 1 assertion out of 1 failed
- 1 failure expected
1 test case out of 1 passed
+ 1 assertion out of 1 failed
+ 1 expected failure
*************************************************************************
Test suite "1 bad test case inside" passed with:
- 1 assertion out of 1 failed
- 1 failure expected
1 test case out of 1 passed
+ 1 assertion out of 1 failed
+ 1 expected failure
Test case "bad_foo" passed with:
1 assertion out of 1 failed
- 1 failure expected
+ 1 expected failure
+
+*************************************************************************
+<TestResult><TestSuite name="1 bad test case inside" result="passed" assertions_passed="0" assertions_failed="1" warnings_failed="0" expected_failures="1" test_cases_passed="1" test_cases_passed_with_warnings="0" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"></TestSuite></TestResult>*************************************************************************
+<TestResult><TestSuite name="1 bad test case inside" result="passed" assertions_passed="0" assertions_failed="1" warnings_failed="0" expected_failures="1" test_cases_passed="1" test_cases_passed_with_warnings="0" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"></TestSuite></TestResult>*************************************************************************
+<TestResult><TestSuite name="1 bad test case inside" result="passed" assertions_passed="0" assertions_failed="1" warnings_failed="0" expected_failures="1" test_cases_passed="1" test_cases_passed_with_warnings="0" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"><TestCase name="bad_foo" result="passed" assertions_passed="0" assertions_failed="1" warnings_failed="0" expected_failures="1"></TestCase></TestSuite></TestResult>*************************************************************************
+
+*** No errors detected
+*************************************************************************
+
+Test suite "1 almost good test case inside" passed with:
+ 1 test case out of 1 passed with warnings
+ 1 failed warning
+
+*************************************************************************
+
+Test suite "1 almost good test case inside" passed with:
+ 1 test case out of 1 passed with warnings
+ 1 failed warning
+
+ Test case "almost_good_foo" passed with:
+ 1 failed warning
*************************************************************************
-<TestResult><TestSuite name="1 bad test case inside" result="passed" assertions_passed="0" assertions_failed="1" expected_failures="1" test_cases_passed="1" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"></TestSuite></TestResult>*************************************************************************
-<TestResult><TestSuite name="1 bad test case inside" result="passed" assertions_passed="0" assertions_failed="1" expected_failures="1" test_cases_passed="1" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"></TestSuite></TestResult>*************************************************************************
-<TestResult><TestSuite name="1 bad test case inside" result="passed" assertions_passed="0" assertions_failed="1" expected_failures="1" test_cases_passed="1" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"><TestCase name="bad_foo" result="passed" assertions_passed="0" assertions_failed="1" expected_failures="1"></TestCase></TestSuite></TestResult>*************************************************************************
+<TestResult><TestSuite name="1 almost good test case inside" result="passed" assertions_passed="0" assertions_failed="0" warnings_failed="1" expected_failures="0" test_cases_passed="0" test_cases_passed_with_warnings="1" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"></TestSuite></TestResult>*************************************************************************
+<TestResult><TestSuite name="1 almost good test case inside" result="passed" assertions_passed="0" assertions_failed="0" warnings_failed="1" expected_failures="0" test_cases_passed="0" test_cases_passed_with_warnings="1" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"></TestSuite></TestResult>*************************************************************************
+<TestResult><TestSuite name="1 almost good test case inside" result="passed" assertions_passed="0" assertions_failed="0" warnings_failed="1" expected_failures="0" test_cases_passed="0" test_cases_passed_with_warnings="1" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"><TestCase name="almost_good_foo" result="passed" assertions_passed="0" assertions_failed="0" warnings_failed="1" expected_failures="0"></TestCase></TestSuite></TestResult>*************************************************************************
*** No errors detected
*************************************************************************
Test suite "2 test cases inside" passed with:
- 1 assertion out of 1 failed
- 1 failure expected
2 test cases out of 2 passed
+ 1 assertion out of 1 failed
+ 1 expected failure
*************************************************************************
Test suite "2 test cases inside" passed with:
- 1 assertion out of 1 failed
- 1 failure expected
2 test cases out of 2 passed
+ 1 assertion out of 1 failed
+ 1 expected failure
Test case "good_foo" passed
Test case "bad_foo" passed with:
1 assertion out of 1 failed
- 1 failure expected
+ 1 expected failure
*************************************************************************
-<TestResult><TestSuite name="2 test cases inside" result="passed" assertions_passed="0" assertions_failed="1" expected_failures="1" test_cases_passed="2" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"></TestSuite></TestResult>*************************************************************************
-<TestResult><TestSuite name="2 test cases inside" result="passed" assertions_passed="0" assertions_failed="1" expected_failures="1" test_cases_passed="2" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"></TestSuite></TestResult>*************************************************************************
-<TestResult><TestSuite name="2 test cases inside" result="passed" assertions_passed="0" assertions_failed="1" expected_failures="1" test_cases_passed="2" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"><TestCase name="good_foo" result="passed" assertions_passed="0" assertions_failed="0" expected_failures="0"></TestCase><TestCase name="bad_foo" result="passed" assertions_passed="0" assertions_failed="1" expected_failures="1"></TestCase></TestSuite></TestResult>*************************************************************************
+<TestResult><TestSuite name="2 test cases inside" result="passed" assertions_passed="0" assertions_failed="1" warnings_failed="0" expected_failures="1" test_cases_passed="2" test_cases_passed_with_warnings="0" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"></TestSuite></TestResult>*************************************************************************
+<TestResult><TestSuite name="2 test cases inside" result="passed" assertions_passed="0" assertions_failed="1" warnings_failed="0" expected_failures="1" test_cases_passed="2" test_cases_passed_with_warnings="0" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"></TestSuite></TestResult>*************************************************************************
+<TestResult><TestSuite name="2 test cases inside" result="passed" assertions_passed="0" assertions_failed="1" warnings_failed="0" expected_failures="1" test_cases_passed="2" test_cases_passed_with_warnings="0" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"><TestCase name="good_foo" result="passed" assertions_passed="0" assertions_failed="0" warnings_failed="0" expected_failures="0"></TestCase><TestCase name="bad_foo" result="passed" assertions_passed="0" assertions_failed="1" warnings_failed="0" expected_failures="1"></TestCase></TestSuite></TestResult>*************************************************************************
*** 2 failures detected in test suite "3 test cases inside"
*************************************************************************
Test suite "3 test cases inside" failed with:
- 2 assertions out of 2 failed
2 test cases out of 3 failed
1 test case out of 3 skipped
1 test case out of 3 aborted
+ 2 assertions out of 2 failed
*************************************************************************
Test suite "3 test cases inside" failed with:
- 2 assertions out of 2 failed
2 test cases out of 3 failed
1 test case out of 3 skipped
1 test case out of 3 aborted
+ 2 assertions out of 2 failed
Test case "bad_foo" failed with:
1 assertion out of 1 failed
@@ -92,26 +113,26 @@
Test case "bad_foo" skipped due to failed dependancy
*************************************************************************
-<TestResult><TestSuite name="3 test cases inside" result="failed" assertions_passed="0" assertions_failed="2" expected_failures="0" test_cases_passed="0" test_cases_failed="2" test_cases_skipped="1" test_cases_aborted="1"></TestSuite></TestResult>*************************************************************************
-<TestResult><TestSuite name="3 test cases inside" result="failed" assertions_passed="0" assertions_failed="2" expected_failures="0" test_cases_passed="0" test_cases_failed="2" test_cases_skipped="1" test_cases_aborted="1"></TestSuite></TestResult>*************************************************************************
-<TestResult><TestSuite name="3 test cases inside" result="failed" assertions_passed="0" assertions_failed="2" expected_failures="0" test_cases_passed="0" test_cases_failed="2" test_cases_skipped="1" test_cases_aborted="1"><TestCase name="bad_foo" result="failed" assertions_passed="0" assertions_failed="1" expected_failures="0"></TestCase><TestCase name="very_bad_foo" result="aborted" assertions_passed="0" assertions_failed="1" expected_failures="0"></TestCase><TestCase name="bad_foo" result="skipped" assertions_passed="0" assertions_failed="0" expected_failures="0"></TestCase></TestSuite></TestResult>*************************************************************************
+<TestResult><TestSuite name="3 test cases inside" result="failed" assertions_passed="0" assertions_failed="2" warnings_failed="0" expected_failures="0" test_cases_passed="0" test_cases_passed_with_warnings="0" test_cases_failed="2" test_cases_skipped="1" test_cases_aborted="1"></TestSuite></TestResult>*************************************************************************
+<TestResult><TestSuite name="3 test cases inside" result="failed" assertions_passed="0" assertions_failed="2" warnings_failed="0" expected_failures="0" test_cases_passed="0" test_cases_passed_with_warnings="0" test_cases_failed="2" test_cases_skipped="1" test_cases_aborted="1"></TestSuite></TestResult>*************************************************************************
+<TestResult><TestSuite name="3 test cases inside" result="failed" assertions_passed="0" assertions_failed="2" warnings_failed="0" expected_failures="0" test_cases_passed="0" test_cases_passed_with_warnings="0" test_cases_failed="2" test_cases_skipped="1" test_cases_aborted="1"><TestCase name="bad_foo" result="failed" assertions_passed="0" assertions_failed="1" warnings_failed="0" expected_failures="0"></TestCase><TestCase name="very_bad_foo" result="aborted" assertions_passed="0" assertions_failed="1" warnings_failed="0" expected_failures="0"></TestCase><TestCase name="bad_foo" result="skipped" assertions_passed="0" assertions_failed="0" warnings_failed="0" expected_failures="0"></TestCase></TestSuite></TestResult>*************************************************************************
*** No errors detected
*************************************************************************
Test suite "Fake Test Suite Hierarchy" passed with:
- 1 assertion out of 1 failed
- 1 failure expected
3 test cases out of 6 passed
3 test cases out of 6 skipped
+ 1 assertion out of 1 failed
+ 1 expected failure
*************************************************************************
Test suite "Fake Test Suite Hierarchy" passed with:
- 1 assertion out of 1 failed
- 1 failure expected
3 test cases out of 6 passed
3 test cases out of 6 skipped
+ 1 assertion out of 1 failed
+ 1 expected failure
Test suite "0 test cases inside" passed
@@ -121,18 +142,18 @@
Test case "good_foo" passed
Test suite "2 test cases inside" passed with:
- 1 assertion out of 1 failed
- 1 failure expected
2 test cases out of 2 passed
+ 1 assertion out of 1 failed
+ 1 expected failure
Test case "good_foo" passed
Test case "bad_foo" passed with:
1 assertion out of 1 failed
- 1 failure expected
+ 1 expected failure
Test suite "3 test cases inside" skipped due to failed dependancy
*************************************************************************
-<TestResult><TestSuite name="Fake Test Suite Hierarchy" result="passed" assertions_passed="0" assertions_failed="1" expected_failures="1" test_cases_passed="3" test_cases_failed="0" test_cases_skipped="3" test_cases_aborted="0"></TestSuite></TestResult>*************************************************************************
-<TestResult><TestSuite name="Fake Test Suite Hierarchy" result="passed" assertions_passed="0" assertions_failed="1" expected_failures="1" test_cases_passed="3" test_cases_failed="0" test_cases_skipped="3" test_cases_aborted="0"></TestSuite></TestResult>*************************************************************************
-<TestResult><TestSuite name="Fake Test Suite Hierarchy" result="passed" assertions_passed="0" assertions_failed="1" expected_failures="1" test_cases_passed="3" test_cases_failed="0" test_cases_skipped="3" test_cases_aborted="0"><TestSuite name="0 test cases inside" result="passed" assertions_passed="0" assertions_failed="0" expected_failures="0" test_cases_passed="0" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"></TestSuite><TestSuite name="1 test cases inside" result="passed" assertions_passed="0" assertions_failed="0" expected_failures="0" test_cases_passed="1" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"><TestCase name="good_foo" result="passed" assertions_passed="0" assertions_failed="0" expected_failures="0"></TestCase></TestSuite><TestSuite name="2 test cases inside" result="passed" assertions_passed="0" assertions_failed="1" expected_failures="1" test_cases_passed="2" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"><TestCase name="good_
foo" result="passed" assertions_passed="0" assertions_failed="0" expected_failures="0"></TestCase><TestCase name="bad_foo" result="passed" assertions_passed="0" assertions_failed="1" expected_failures="1"></TestCase></TestSuite><TestSuite name="3 test cases inside" result="skipped" assertions_passed="0" assertions_failed="0" expected_failures="0" test_cases_passed="0" test_cases_failed="0" test_cases_skipped="3" test_cases_aborted="0"></TestSuite></TestSuite></TestResult>*************************************************************************
+<TestResult><TestSuite name="Fake Test Suite Hierarchy" result="passed" assertions_passed="0" assertions_failed="1" warnings_failed="0" expected_failures="1" test_cases_passed="3" test_cases_passed_with_warnings="0" test_cases_failed="0" test_cases_skipped="3" test_cases_aborted="0"></TestSuite></TestResult>*************************************************************************
+<TestResult><TestSuite name="Fake Test Suite Hierarchy" result="passed" assertions_passed="0" assertions_failed="1" warnings_failed="0" expected_failures="1" test_cases_passed="3" test_cases_passed_with_warnings="0" test_cases_failed="0" test_cases_skipped="3" test_cases_aborted="0"></TestSuite></TestResult>*************************************************************************
+<TestResult><TestSuite name="Fake Test Suite Hierarchy" result="passed" assertions_passed="0" assertions_failed="1" warnings_failed="0" expected_failures="1" test_cases_passed="3" test_cases_passed_with_warnings="0" test_cases_failed="0" test_cases_skipped="3" test_cases_aborted="0"><TestSuite name="0 test cases inside" result="passed" assertions_passed="0" assertions_failed="0" warnings_failed="0" expected_failures="0" test_cases_passed="0" test_cases_passed_with_warnings="0" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"></TestSuite><TestSuite name="1 test cases inside" result="passed" assertions_passed="0" assertions_failed="0" warnings_failed="0" expected_failures="0" test_cases_passed="1" test_cases_passed_with_warnings="0" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"><TestCase name="good_foo" result="passed" assertions_passed="0" assertions_failed="0" warnings_failed="0" expected_failures="0"></TestCase></TestSuite><TestSuite name="2 test cases inside" resul
t="passed" assertions_passed="0" assertions_failed="1" warnings_failed="0" expected_failures="1" test_cases_passed="2" test_cases_passed_with_warnings="0" test_cases_failed="0" test_cases_skipped="0" test_cases_aborted="0"><TestCase name="good_foo" result="passed" assertions_passed="0" assertions_failed="0" warnings_failed="0" expected_failures="0"></TestCase><TestCase name="bad_foo" result="passed" assertions_passed="0" assertions_failed="1" warnings_failed="0" expected_failures="1"></TestCase></TestSuite><TestSuite name="3 test cases inside" result="skipped" assertions_passed="0" assertions_failed="0" warnings_failed="0" expected_failures="0" test_cases_passed="0" test_cases_passed_with_warnings="0" test_cases_failed="0" test_cases_skipped="3" test_cases_aborted="0"></TestSuite></TestSuite></TestResult>*************************************************************************
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk