Remove uses of assert() from tests

[SVN r33011]
This commit is contained in:
Dave Abrahams
2006-02-19 15:03:31 +00:00
parent be3a039e88
commit cc22df0753
2 changed files with 5 additions and 2 deletions

View File

@@ -6,12 +6,13 @@
#define HASH_NAMESPACE boost
#include <boost/functional/hash.hpp>
#include <boost/detail/lightweight_test.hpp>
#include <vector>
int f(std::size_t hash1, int* x1) {
// Check that HASH_NAMESPACE::hash<int*> works in both files.
HASH_NAMESPACE::hash<int*> ptr_hasher;
assert(hash1 == ptr_hasher(x1));
BOOST_TEST(hash1 == ptr_hasher(x1));
// Check that std::vector<std::size_t> is avaiable in this file.
std::vector<std::size_t> x;

View File

@@ -7,11 +7,13 @@
#define HASH_NAMESPACE boost
#define BOOST_HASH_NO_EXTENSIONS
#include <boost/functional/hash.hpp>
#include <boost/detail/lightweight_test.hpp>
extern int f(std::size_t, int*);
int main() {
HASH_NAMESPACE::hash<int*> ptr_hasher;
int x = 55;
return f(ptr_hasher(&x), &x);
BOOST_TEST(!f(ptr_hasher(&x), &x));
return boost::report_errors();
}