|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57993 - in branches/release/libs/test: build example test test/test_files
From: gennadiy.rozental_at_[hidden]
Date: 2009-11-28 05:06:12
Author: rogeeff
Date: 2009-11-28 05:06:10 EST (Sat, 28 Nov 2009)
New Revision: 57993
URL: http://svn.boost.org/trac/boost/changeset/57993
Log:
merge into release
Added:
branches/release/libs/test/test/CMakeLists.txt (contents, props changed)
Text files modified:
branches/release/libs/test/build/Jamfile.v2 | 1 +
branches/release/libs/test/example/unit_test_example_11.cpp | 5 +++++
branches/release/libs/test/test/Jamfile.v2 | 1 +
branches/release/libs/test/test/boost_check_equal_str.cpp | 2 +-
branches/release/libs/test/test/foreach_test.cpp | 4 ++++
branches/release/libs/test/test/result_report_test.cpp | 2 ++
branches/release/libs/test/test/test_files/errors_handling_test.pattern | 12 ++++++------
branches/release/libs/test/test/test_files/errors_handling_test.pattern2 | 12 ++++++------
branches/release/libs/test/test/test_tools_test.cpp | 2 +-
branches/release/libs/test/test/test_tree_management_test.cpp | 40 +++++++++++++++++++++++++++++++++++++++-
10 files changed, 66 insertions(+), 15 deletions(-)
Modified: branches/release/libs/test/build/Jamfile.v2
==============================================================================
--- branches/release/libs/test/build/Jamfile.v2 (original)
+++ branches/release/libs/test/build/Jamfile.v2 2009-11-28 05:06:10 EST (Sat, 28 Nov 2009)
@@ -9,6 +9,7 @@
: requirements <link>shared:<define>BOOST_TEST_DYN_LINK=1
<toolset>msvc:<asynch-exceptions>on
<toolset>borland:<cxxflags>-w-8080
+ <toolset>borland:<cxxflags>-w-8001
# Disable Warning about boost::noncopyable not being exported
<link>shared,<toolset>msvc:<cxxflags>-wd4275
<toolset>msvc:<cxxflags>-wd4671
Modified: branches/release/libs/test/example/unit_test_example_11.cpp
==============================================================================
--- branches/release/libs/test/example/unit_test_example_11.cpp (original)
+++ branches/release/libs/test/example/unit_test_example_11.cpp 2009-11-28 05:06:10 EST (Sat, 28 Nov 2009)
@@ -15,6 +15,9 @@
#include <vector>
#include <string>
+#define LOG_FATAL_ERROR( M ) \
+BOOST_TEST_LOG_ENTRY( ::boost::unit_test::log_fatal_errors ) \
+ << (::boost::unit_test::lazy_ostream::instance() << M)
//____________________________________________________________________________//
// this free function is invoked with all parameters specified in a list
@@ -30,6 +33,8 @@
init_unit_test_suite( int /*argc*/, char* /*argv*/[] ) {
framework::master_test_suite().p_name.value = "Unit test example 11";
+ LOG_FATAL_ERROR( "something happend" );
+
// parameters have no requirements to stay alive beyond the next statement
std::string const params[] = { "hdr1 ", "hdr2", "3 " };
Added: branches/release/libs/test/test/CMakeLists.txt
==============================================================================
--- (empty file)
+++ branches/release/libs/test/test/CMakeLists.txt 2009-11-28 05:06:10 EST (Sat, 28 Nov 2009)
@@ -0,0 +1,43 @@
+add_definitions(-DBOOST_TEST_NO_AUTO_LINK=1)
+# shared needs:
+add_definitions(-DBOOST_TEST_DYN_LINK=1)
+
+if(BORLAND)
+ add_definitions(-w-8080)
+endif(BORLAND)
+
+# Basic tests
+boost_test_run(class_properties_test DEPENDS boost_unit_test_framework SHARED)
+boost_test_run(basic_cstring_test DEPENDS boost_unit_test_framework)
+
+# Program execution monitor tests
+boost_test_run_fail(prg_exec_fail1 DEPENDS boost_prg_exec_monitor)
+boost_test_run_fail(prg_exec_fail2 DEPENDS boost_prg_exec_monitor)
+boost_test_run_fail(prg_exec_fail3 DEPENDS boost_prg_exec_monitor)
+boost_test_run_fail(prg_exec_fail4 DEPENDS boost_prg_exec_monitor)
+
+# Unit test framework tests
+# NOTE: skipped errors_handling_test until I figure out what BBv2 is doing
+boost_test_run(online_test)
+boost_test_run_fail(minimal_test)
+boost_test_run(foreach_test)
+boost_test_run(output_test_stream_test DEPENDS boost_unit_test_framework SHARED)
+
+# NOTE: skipped result_report_test until I figure out what BBv2 is doing
+
+boost_test_run(parameterized_test_test DEPENDS boost_unit_test_framework SHARED)
+boost_test_run(test_fp_comparisons DEPENDS boost_unit_test_framework SHARED)
+
+# NOTE: skipped test_tools_test until I figure out what BBv2 is doing
+
+boost_test_run(test_case_template_test DEPENDS boost_unit_test_framework SHARED)
+
+boost_test_run(custom_exception_test DEPENDS boost_unit_test_framework)
+
+boost_test_run(fixed_mapping_test DEPENDS boost_unit_test_framework SHARED)
+
+# NOTE: skipped ifstream_line_iterator_test until I figure out what BBv2 is doing
+
+boost_test_run(algorithms_test DEPENDS boost_unit_test_framework)
+boost_test_run(token_iterator_test DEPENDS boost_unit_test_framework SHARED)
+boost_test_run(boost_check_equal_str DEPENDS boost_unit_test_framework SHARED)
Modified: branches/release/libs/test/test/Jamfile.v2
==============================================================================
--- branches/release/libs/test/test/Jamfile.v2 (original)
+++ branches/release/libs/test/test/Jamfile.v2 2009-11-28 05:06:10 EST (Sat, 28 Nov 2009)
@@ -20,6 +20,7 @@
<toolset>gcc:<cxxflags>-pedantic
<toolset>gcc:<cxxflags>-Wno-long-long
<toolset>borland:<cxxflags>-w-8080
+ <toolset>borland:<cxxflags>-w-8084
<toolset>msvc-6.5:<link>static
<toolset>msvc-8.0:<define>_SCL_SECURE_NO_DEPRECATE
<warnings>all
Modified: branches/release/libs/test/test/boost_check_equal_str.cpp
==============================================================================
--- branches/release/libs/test/test/boost_check_equal_str.cpp (original)
+++ branches/release/libs/test/test/boost_check_equal_str.cpp 2009-11-28 05:06:10 EST (Sat, 28 Nov 2009)
@@ -19,8 +19,8 @@
{
char const* buf_ptr_cch = "abc";
char const buf_array_cch[] = "abc";
- char* buf_ptr_ch = "abc";
char buf_array_ch[] = "abc";
+ char* buf_ptr_ch = buf_array_ch;
std::string buf_str = "abc";
BOOST_CHECK_EQUAL(buf_ptr_cch, buf_ptr_cch);
Modified: branches/release/libs/test/test/foreach_test.cpp
==============================================================================
--- branches/release/libs/test/test/foreach_test.cpp (original)
+++ branches/release/libs/test/test/foreach_test.cpp 2009-11-28 05:06:10 EST (Sat, 28 Nov 2009)
@@ -20,6 +20,10 @@
#include <boost/test/utils/foreach.hpp>
+#ifdef BOOST_MSVC
+#pragma warning(disable:4702) // Unreachable code
+#endif
+
template<class T>
void baz( std::list<T>const& list_of_T )
{
Modified: branches/release/libs/test/test/result_report_test.cpp
==============================================================================
--- branches/release/libs/test/test/result_report_test.cpp (original)
+++ branches/release/libs/test/test/result_report_test.cpp 2009-11-28 05:06:10 EST (Sat, 28 Nov 2009)
@@ -58,6 +58,7 @@
void very_bad_foo() {
log_guard lg;
+ ut_detail::ignore_unused_variable_warning( lg );
onullstream_type null_out;
unit_test_log.set_stream( null_out );
BOOST_FAIL( "" );
@@ -105,6 +106,7 @@
BOOST_AUTO_TEST_CASE( test_result_reports )
{
guard G;
+ ut_detail::ignore_unused_variable_warning( G );
#define PATTERN_FILE_NAME "result_report_test.pattern"
Modified: branches/release/libs/test/test/test_files/errors_handling_test.pattern
==============================================================================
--- branches/release/libs/test/test/test_files/errors_handling_test.pattern (original)
+++ branches/release/libs/test/test/test_files/errors_handling_test.pattern 2009-11-28 05:06:10 EST (Sat, 28 Nov 2009)
@@ -11,7 +11,7 @@
Entering test case "error_on_demand"
message
-Test case error_on_demand did not run any assertions
+Test case error_on_demand did not check any assertions
Leaving test case "error_on_demand"
===========================
@@ -19,7 +19,7 @@
Entering test case "error_on_demand"
107: warning in "error_on_demand": warning
-Test case error_on_demand did not run any assertions
+Test case error_on_demand did not check any assertions
Leaving test case "error_on_demand"
===========================
@@ -72,7 +72,7 @@
Entering test case "error_on_demand"
message
-Test case error_on_demand did not run any assertions
+Test case error_on_demand did not check any assertions
Leaving test case "error_on_demand"
===========================
@@ -80,7 +80,7 @@
Entering test case "error_on_demand"
107: warning in "error_on_demand": warning
-Test case error_on_demand did not run any assertions
+Test case error_on_demand did not check any assertions
Leaving test case "error_on_demand"
===========================
@@ -130,13 +130,13 @@
log level: log_messages; error type: user message;
message
-Test case error_on_demand did not run any assertions
+Test case error_on_demand did not check any assertions
===========================
log level: log_messages; error type: user warning;
107: warning in "error_on_demand": warning
-Test case error_on_demand did not run any assertions
+Test case error_on_demand did not check any assertions
===========================
log level: log_messages; error type: user non-fatal error;
Modified: branches/release/libs/test/test/test_files/errors_handling_test.pattern2
==============================================================================
--- branches/release/libs/test/test/test_files/errors_handling_test.pattern2 (original)
+++ branches/release/libs/test/test/test_files/errors_handling_test.pattern2 2009-11-28 05:06:10 EST (Sat, 28 Nov 2009)
@@ -11,7 +11,7 @@
Entering test case "error_on_demand"
message
-Test case error_on_demand did not run any assertions
+Test case error_on_demand did not check any assertions
Leaving test case "error_on_demand"
===========================
@@ -19,7 +19,7 @@
Entering test case "error_on_demand"
107: warning in "error_on_demand": warning
-Test case error_on_demand did not run any assertions
+Test case error_on_demand did not check any assertions
Leaving test case "error_on_demand"
===========================
@@ -55,7 +55,7 @@
Entering test case "error_on_demand"
message
-Test case error_on_demand did not run any assertions
+Test case error_on_demand did not check any assertions
Leaving test case "error_on_demand"
===========================
@@ -63,7 +63,7 @@
Entering test case "error_on_demand"
107: warning in "error_on_demand": warning
-Test case error_on_demand did not run any assertions
+Test case error_on_demand did not check any assertions
Leaving test case "error_on_demand"
===========================
@@ -96,13 +96,13 @@
log level: log_messages; error type: user message;
message
-Test case error_on_demand did not run any assertions
+Test case error_on_demand did not check any assertions
===========================
log level: log_messages; error type: user warning;
107: warning in "error_on_demand": warning
-Test case error_on_demand did not run any assertions
+Test case error_on_demand did not check any assertions
===========================
log level: log_messages; error type: user non-fatal error;
Modified: branches/release/libs/test/test/test_tools_test.cpp
==============================================================================
--- branches/release/libs/test/test/test_tools_test.cpp (original)
+++ branches/release/libs/test/test/test_tools_test.cpp 2009-11-28 05:06:10 EST (Sat, 28 Nov 2009)
@@ -503,7 +503,7 @@
//____________________________________________________________________________//
struct A {
- friend std::ostream& operator<<( std::ostream& str, A const& a ) { str << "struct A"; return str;}
+ friend std::ostream& operator<<( std::ostream& str, A const& ) { str << "struct A"; return str;}
};
TEST_CASE( test_BOOST_TEST_MESSAGE )
Modified: branches/release/libs/test/test/test_tree_management_test.cpp
==============================================================================
--- branches/release/libs/test/test/test_tree_management_test.cpp (original)
+++ branches/release/libs/test/test/test_tree_management_test.cpp 2009-11-28 05:06:10 EST (Sat, 28 Nov 2009)
@@ -16,6 +16,9 @@
#define BOOST_TEST_MODULE test tree management test
#include <boost/test/unit_test.hpp>
using namespace boost::unit_test;
+
+#include <boost/mpl/vector.hpp>
+
//____________________________________________________________________________//
// some empty test suites/cases
@@ -52,6 +55,33 @@
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE( S3 )
+
+BOOST_AUTO_TEST_SUITE_END()
+
+struct F1 {
+ F1() { BOOST_TEST_MESSAGE( "In F1" ); }
+};
+
+BOOST_AUTO_TEST_SUITE( S4 )
+
+typedef boost::mpl::vector<int,float,char> test_types;
+BOOST_FIXTURE_TEST_CASE_TEMPLATE( tctempl, T, test_types, F1 )
+{
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+struct F2 {
+ F2() { BOOST_TEST_MESSAGE( "In F2" ); }
+};
+
+BOOST_FIXTURE_TEST_SUITE( S5, F2 )
+
+typedef boost::mpl::vector<int,float,char,double,int> test_types;
+BOOST_AUTO_TEST_CASE_TEMPLATE( tctempl, T, test_types )
+{
+}
+
BOOST_AUTO_TEST_SUITE_END()
//____________________________________________________________________________//
@@ -152,7 +182,7 @@
{
test_suite& mts = framework::master_test_suite();
- BOOST_CHECK_EQUAL( mts.size(), 8U );
+ BOOST_CHECK_EQUAL( mts.size(), 10U );
BOOST_CHECK_EQUAL( mts.p_expected_failures, 2U );
BOOST_CHECK_EQUAL( framework::get<test_case>( mts.get( "automated_test_units_registration" ) ).p_expected_failures, 0U );
@@ -176,6 +206,14 @@
BOOST_CHECK_EQUAL( S21.size(), 1U );
BOOST_CHECK_EQUAL( S1.p_expected_failures, 1U );
+
+ test_suite& S4 = framework::get<test_suite>( mts.get( "S4" ) );
+
+ BOOST_CHECK_EQUAL( S4.size(), 3U );
+
+ test_suite& S5 = framework::get<test_suite>( mts.get( "S5" ) );
+
+ BOOST_CHECK_EQUAL( S5.size(), 5U );
}
//____________________________________________________________________________//
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