Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81248 - in trunk/libs/test/test: . test_files
From: gennadiy.rozental_at_[hidden]
Date: 2012-11-08 02:47:14


Author: rogeeff
Date: 2012-11-08 02:47:12 EST (Thu, 08 Nov 2012)
New Revision: 81248
URL: http://svn.boost.org/trac/boost/changeset/81248

Log:
older compilers support
Text files modified:
   trunk/libs/test/test/test_files/test_tools_test.pattern | 58 ++++++++++++++++++++--------------------
   trunk/libs/test/test/test_tools_test.cpp | 16 ++++++----
   2 files changed, 38 insertions(+), 36 deletions(-)

Modified: trunk/libs/test/test/test_files/test_tools_test.pattern
==============================================================================
--- trunk/libs/test/test/test_files/test_tools_test.pattern (original)
+++ trunk/libs/test/test/test_files/test_tools_test.pattern 2012-11-08 02:47:12 EST (Thu, 08 Nov 2012)
@@ -101,35 +101,35 @@
 639: error: in "test_context_logging": check false failed
 Failure occurred in a following context:
     outer context
-668: info: check true passed
-669: error: in "test_BOOST_TEST_universal": check false failed
-672: info: check bc passed
-675: error: in "test_BOOST_TEST_universal": check i == 2 failed [1 != 2]
-676: error: in "test_BOOST_TEST_universal": check i != 1 failed [1 == 1]
-677: error: in "test_BOOST_TEST_universal": check i > 2 failed [1 <= 2]
-678: error: in "test_BOOST_TEST_universal": check i < 1 failed [1 >= 1]
-679: error: in "test_BOOST_TEST_universal": check i <= 0 failed [1 > 0]
-680: error: in "test_BOOST_TEST_universal": check i >= 5 failed [1 < 5]
-683: error: in "test_BOOST_TEST_universal": check i+j >= 5 failed [1 + 2 < 5]
-684: error: in "test_BOOST_TEST_universal": check j-i == 2 failed [2 - 1 != 2]
-687: error: in "test_BOOST_TEST_universal": check *p == 2 failed [1 != 2]
-689: error: in "test_BOOST_TEST_universal": check j-*p == 0 failed [2 - 1 != 0]
-691: info: check ( i > 5, true ) passed
-695: error: in "test_BOOST_TEST_universal": check FooType() failed [(bool)0 is false]
-696: error: in "test_BOOST_TEST_universal": check *F failed [(bool)0 is false]
-697: error: in "test_BOOST_TEST_universal": check **F failed [(bool)0 is false]
-698: error: in "test_BOOST_TEST_universal": check ***F failed [(bool)0 is false]
-699: error: in "test_BOOST_TEST_universal": check &F > 100 failed [10 <= 100]
-700: error: in "test_BOOST_TEST_universal": check &*F > 100 failed [10 <= 100]
-702: error: in "test_BOOST_TEST_universal": check (i == 1) & (j == 1) failed [1 & 0]
-703: error: in "test_BOOST_TEST_universal": check (i == 2) | (j == 1) failed [0 | 0]
-705: error: in "test_BOOST_TEST_universal": check ( i == 1 && j == 1 ) failed
-706: error: in "test_BOOST_TEST_universal": check ( i == 2 || j == 1 ) failed
-708: error: in "test_BOOST_TEST_universal": This message reported instead
-712: info: check true passed
-718: info: check true passed
-730: error: in "test_BOOST_TEST_universal": check v <= l failed.
+670: info: check true passed
+671: error: in "test_BOOST_TEST_universal": check false failed
+674: info: check bc passed
+677: error: in "test_BOOST_TEST_universal": check i == 2 failed [1 != 2]
+678: error: in "test_BOOST_TEST_universal": check i != 1 failed [1 == 1]
+679: error: in "test_BOOST_TEST_universal": check i > 2 failed [1 <= 2]
+680: error: in "test_BOOST_TEST_universal": check i < 1 failed [1 >= 1]
+681: error: in "test_BOOST_TEST_universal": check i <= 0 failed [1 > 0]
+682: error: in "test_BOOST_TEST_universal": check i >= 5 failed [1 < 5]
+685: error: in "test_BOOST_TEST_universal": check i+j >= 5 failed [1 + 2 < 5]
+686: error: in "test_BOOST_TEST_universal": check j-i == 2 failed [2 - 1 != 2]
+689: error: in "test_BOOST_TEST_universal": check *p == 2 failed [1 != 2]
+691: error: in "test_BOOST_TEST_universal": check j-*p == 0 failed [2 - 1 != 0]
+693: info: check ( i > 5, true ) passed
+697: error: in "test_BOOST_TEST_universal": check FooType() failed [(bool)0 is false]
+698: error: in "test_BOOST_TEST_universal": check *F failed [(bool)0 is false]
+699: error: in "test_BOOST_TEST_universal": check **F failed [(bool)0 is false]
+700: error: in "test_BOOST_TEST_universal": check ***F failed [(bool)0 is false]
+701: error: in "test_BOOST_TEST_universal": check &F > 100 failed [10 <= 100]
+702: error: in "test_BOOST_TEST_universal": check &*F > 100 failed [10 <= 100]
+704: error: in "test_BOOST_TEST_universal": check (i == 1) & (j == 1) failed [1 & 0]
+705: error: in "test_BOOST_TEST_universal": check (i == 2) | (j == 1) failed [0 | 0]
+707: error: in "test_BOOST_TEST_universal": check ( i == 1 && j == 1 ) failed
+708: error: in "test_BOOST_TEST_universal": check ( i == 2 || j == 1 ) failed
+710: error: in "test_BOOST_TEST_universal": This message reported instead
+714: info: check true passed
+720: info: check true passed
+732: error: in "test_BOOST_TEST_universal": check v <= l failed.
 Mismatch in a position 2: 3 > 2
-731: error: in "test_BOOST_TEST_universal": check v == l failed.
+733: error: in "test_BOOST_TEST_universal": check v == l failed.
 Mismatch in a position 1: 2 != 3
 Mismatch in a position 2: 3 != 2

Modified: trunk/libs/test/test/test_tools_test.cpp
==============================================================================
--- trunk/libs/test/test/test_tools_test.cpp (original)
+++ trunk/libs/test/test/test_tools_test.cpp 2012-11-08 02:47:12 EST (Thu, 08 Nov 2012)
@@ -651,8 +651,10 @@
 
 #ifndef BOOST_NO_DECLTYPE
 #define BOOST_TEST_FWD_1(P,M) BOOST_TEST(P)
+#define BOOST_TEST_FWD_3(P,M) BOOST_TEST(P)
 #else
 #define BOOST_TEST_FWD_1(P,M) BOOST_CHECK_MESSAGE( P, M );
+#define BOOST_TEST_FWD_3(P,M) BOOST_ERROR(M)
 #endif
 
 #if BOOST_PP_VARIADICS
@@ -680,13 +682,13 @@
     BOOST_TEST( i >= 5 );
 
     int j = 2;
- BOOST_TEST_FWD_1( i+j >= 5, "check i+j >= 5 failed [1+2<5]" );
- BOOST_TEST_FWD_1( j-i == 2, "check j-i == 2 failed [2-1!=2]" );
+ BOOST_TEST_FWD_1( i+j >= 5, "check i+j >= 5 failed [1 + 2 < 5]" );
+ BOOST_TEST_FWD_1( j-i == 2, "check j-i == 2 failed [2 - 1 != 2]" );
 
     int* p = &i;
     BOOST_TEST( *p == 2 );
 
- BOOST_TEST_FWD_1( j-*p == 0, "check j-*p == 0 failed [2-1!=0]" );
+ BOOST_TEST_FWD_1( j-*p == 0, "check j-*p == 0 failed [2 - 1 != 0]" );
 
     BOOST_TEST(( i > 5, true ));
 
@@ -699,8 +701,8 @@
     BOOST_TEST( &F > 100 );
     BOOST_TEST( &*F > 100 );
 
- BOOST_TEST_FWD_1( (i == 1) & (j == 1), "check (i == 1) & (j == 1) failed [1&0]" );
- BOOST_TEST_FWD_1( (i == 2) | (j == 1), "check (i == 2) | (j == 1) failed [0|0]" );
+ BOOST_TEST_FWD_1( (i == 1) & (j == 1), "check (i == 1) & (j == 1) failed [1 & 0]" );
+ BOOST_TEST_FWD_1( (i == 2) | (j == 1), "check (i == 2) | (j == 1) failed [0 | 0]" );
 
     BOOST_TEST(( i == 1 && j == 1 ));
     BOOST_TEST(( i == 2 || j == 1 ));
@@ -727,8 +729,8 @@
     l.push_back( 3 );
     l.push_back( 2 );
 
- BOOST_TEST( v <= l );
- BOOST_TEST( v == l );
+ BOOST_TEST_FWD_3( v <= l, "check v <= l failed.\nMismatch in a position 2: 3 > 2" );
+ BOOST_TEST_FWD_3( v == l, "check v == l failed.\nMismatch in a position 1: 2 != 3\nMismatch in a position 2: 3 != 2" );
 
     // Does not work
     // BOOST_TEST( i == 1 && j == 1 );


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