Update of /cvsroot/boost/boost/libs/parameter/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29671/libs/parameter/test

Modified Files:
      Tag: RC_1_34_0
        sfinae.cpp 
Log Message:
Correct testing bugs:

    either changing assert(...) or BOOST_ASSERT(...) to BOOST_TEST 
    (in my code only)

    or adding "return boost::report_errors();" where it was clearly
    missing (and a pure bug, in anyone's code).

    or changing BOOST_TEST to BOOST_CHECK where the integer library
    was clearly using Boost.Test and not returning report_errors().


Index: sfinae.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/parameter/test/sfinae.cpp,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -u -d -r1.15 -r1.15.2.1
--- sfinae.cpp  4 Feb 2006 09:28:19 -0000       1.15
+++ sfinae.cpp  25 Feb 2007 15:28:01 -0000      1.15.2.1
@@ -5,7 +5,7 @@
 
 #include <boost/parameter.hpp>
 #include <boost/parameter/match.hpp>
-#include <boost/assert.hpp>
+#include <boost/detail/lightweight_test.hpp>
 #include <string>
 #include <boost/type_traits/is_convertible.hpp>
 
@@ -38,14 +38,14 @@
   // vc++ 6 ICE.
   void assert_equal_string(std::string x, std::string y)
   {
-        BOOST_ASSERT(x == y);
+        BOOST_TEST(x == y);
   }
   
   template<class P>
   void f_impl(P const& p)
   {
       float v = p[value | 3.f];
-      BOOST_ASSERT(v == 3.f);
+      BOOST_TEST(v == 3.f);
       assert_equal_string(p[name | "bar"], "foo");
   }
 
@@ -97,9 +97,8 @@
     f(value = 3.f, name = "foo");
 
 #ifndef BOOST_NO_SFINAE
-    return f(3, 4);
-#else 
-    return 0;
-#endif 
+    BOOST_TEST(f(3, 4) == 0);
+#endif
+    return boost::report_errors();
 }
 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to