|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r69102 - sandbox/bitfield/libs/bitfield/test
From: vicente.botet_at_[hidden]
Date: 2011-02-20 15:11:29
Author: viboes
Date: 2011-02-20 15:11:28 EST (Sun, 20 Feb 2011)
New Revision: 69102
URL: http://svn.boost.org/trac/boost/changeset/69102
Log:
Bitfield: Use lightweight_test instead of assert
Text files modified:
sandbox/bitfield/libs/bitfield/test/bitfield_test.cpp | 11 +++++------
sandbox/bitfield/libs/bitfield/test/pointer_plus_small_int_test.cpp | 11 ++++++-----
2 files changed, 11 insertions(+), 11 deletions(-)
Modified: sandbox/bitfield/libs/bitfield/test/bitfield_test.cpp
==============================================================================
--- sandbox/bitfield/libs/bitfield/test/bitfield_test.cpp (original)
+++ sandbox/bitfield/libs/bitfield/test/bitfield_test.cpp 2011-02-20 15:11:28 EST (Sun, 20 Feb 2011)
@@ -1,15 +1,15 @@
#include <iostream>
-#include <cassert>
#include <boost/integer/bitfield.hpp>
//~ #include <boost/integer/bitfield/bitfield_dcl.hpp>
#include <sys/stat.h>
#include <errno.h>
#include <libs/bitfield/test/endian_flip.hpp>
+#include <boost/detail/lightweight_test.hpp>
-#define ASSERT_EQUALS(a,b) assert((a) == (b))
-#define ASSERT_UNEQUALS(a,b) assert((a) != (b))
-#define ASSERT(a) assert((a))
+#define ASSERT_EQUALS(a,b) BOOST_TEST((a) == (b))
+#define ASSERT_UNEQUALS(a,b) BOOST_TEST((a) != (b))
+#define ASSERT(a) BOOST_TEST((a))
//typedef unsigned short uint16_t;
//typedef unsigned char uint8_t;
@@ -311,7 +311,6 @@
test_bit_access();
test_signed_unsigned();
- std::cout << "All tests successful!\n";
- return 0;
+ return boost::report_errors();
}
Modified: sandbox/bitfield/libs/bitfield/test/pointer_plus_small_int_test.cpp
==============================================================================
--- sandbox/bitfield/libs/bitfield/test/pointer_plus_small_int_test.cpp (original)
+++ sandbox/bitfield/libs/bitfield/test/pointer_plus_small_int_test.cpp 2011-02-20 15:11:28 EST (Sun, 20 Feb 2011)
@@ -7,9 +7,11 @@
#include <unistd.h>
#include <netinet/in.h>
-#define ASSERT_EQUALS(a,b) assert((a) == (b))
-#define ASSERT_UNEQUALS(a,b) assert((a) != (b))
-#define ASSERT(a) assert((a))
+#include <boost/detail/lightweight_test.hpp>
+
+#define ASSERT_EQUALS(a,b) BOOST_TEST((a) == (b))
+#define ASSERT_UNEQUALS(a,b) BOOST_TEST((a) != (b))
+#define ASSERT(a) BOOST_TEST((a))
void test_tt()
@@ -69,7 +71,6 @@
test_tt();
test_tt2();
- std::cout << "All tests successful!\n";
- return 0;
+ return boost::report_errors();
}
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