|
Boost-Commit : |
From: daniel_james_at_[hidden]
Date: 2008-05-28 13:54:53
Author: danieljames
Date: 2008-05-28 13:54:53 EDT (Wed, 28 May 2008)
New Revision: 45874
URL: http://svn.boost.org/trac/boost/changeset/45874
Log:
Merge from trunk.
Properties modified:
branches/unordered/trunk/ (props changed)
Text files modified:
branches/unordered/trunk/libs/unordered/test/helpers/test.hpp | 14 ++++++++++++--
branches/unordered/trunk/libs/unordered/test/unordered/Jamfile.v2 | 2 +-
branches/unordered/trunk/libs/unordered/test/unordered/move_tests.cpp | 6 ++++++
3 files changed, 19 insertions(+), 3 deletions(-)
Modified: branches/unordered/trunk/libs/unordered/test/helpers/test.hpp
==============================================================================
--- branches/unordered/trunk/libs/unordered/test/helpers/test.hpp (original)
+++ branches/unordered/trunk/libs/unordered/test/helpers/test.hpp 2008-05-28 13:54:53 EDT (Wed, 28 May 2008)
@@ -16,10 +16,14 @@
#include <boost/test/minimal.hpp>
#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/stringize.hpp>
+#include <iostream>
#define UNORDERED_AUTO_TEST(x) \
struct BOOST_PP_CAT(x, _type) : public ::test::registered_test_base { \
- BOOST_PP_CAT(x, _type)() { \
+ BOOST_PP_CAT(x, _type)() \
+ : ::test::registered_test_base(BOOST_PP_STRINGIZE(x)) \
+ { \
::test::test_list::add_test(this); \
} \
void run(); \
@@ -31,6 +35,8 @@
namespace test {
struct registered_test_base {
registered_test_base* next;
+ char const* name;
+ explicit registered_test_base(char const* n) : name(n) {}
virtual void run() = 0;
virtual ~registered_test_base() {}
};
@@ -58,8 +64,12 @@
}
static inline void run_tests() {
- for(registered_test_base* i = first(); i; i = i->next)
+ for(registered_test_base* i = first(); i; i = i->next) {
+ std::cout<<"Running "<<i->name<<"\n"<<std::flush;
i->run();
+ std::cerr<<std::flush;
+ std::cout<<std::flush;
+ }
}
}
}
Modified: branches/unordered/trunk/libs/unordered/test/unordered/Jamfile.v2
==============================================================================
--- branches/unordered/trunk/libs/unordered/test/unordered/Jamfile.v2 (original)
+++ branches/unordered/trunk/libs/unordered/test/unordered/Jamfile.v2 2008-05-28 13:54:53 EDT (Wed, 28 May 2008)
@@ -21,7 +21,7 @@
[ run equivalent_keys_tests.cpp ]
[ run constructor_tests.cpp ]
[ run copy_tests.cpp ]
- [ run move_tests.cpp ]
+ [ run move_tests.cpp : : : <test-info>always_show_run_output ]
[ run assign_tests.cpp ]
[ run insert_tests.cpp ]
[ run insert_stable_tests.cpp ]
Modified: branches/unordered/trunk/libs/unordered/test/unordered/move_tests.cpp
==============================================================================
--- branches/unordered/trunk/libs/unordered/test/unordered/move_tests.cpp (original)
+++ branches/unordered/trunk/libs/unordered/test/unordered/move_tests.cpp 2008-05-28 13:54:53 EDT (Wed, 28 May 2008)
@@ -125,7 +125,13 @@
{
test::random_values<T> v(25);
T y(create(v, count, hf, eq, al, 1.0), al);
+#if defined(BOOST_HAS_RVALUE_REFS)
BOOST_CHECK(count == test::global_object_count);
+#else
+ BOOST_CHECK(test::global_object_count.constructions - count.constructions <=
+ (test::is_map<T>::value ? 50 : 25));
+ BOOST_CHECK(count.instances == test::global_object_count.instances);
+#endif
test::check_container(y, v);
BOOST_CHECK(test::equivalent(y.hash_function(), hf));
BOOST_CHECK(test::equivalent(y.key_eq(), eq));
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