mirror of
https://github.com/boostorg/functional.git
synced 2025-08-01 21:44:28 +02:00
Remove uses of assert() from tests
[SVN r33011]
This commit is contained in:
@@ -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;
|
||||
|
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user