|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r82125 - in branches/release: . libs libs/functional libs/functional/hash/test
From: dnljms_at_[hidden]
Date: 2012-12-20 15:38:12
Author: danieljames
Date: 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
New Revision: 82125
URL: http://svn.boost.org/trac/boost/changeset/82125
Log:
Merge hash test fixes.
Properties modified:
branches/release/ (props changed)
branches/release/libs/ (props changed)
branches/release/libs/functional/ (props changed)
branches/release/libs/functional/hash/test/Jamfile.v2 (contents, props changed)
Text files modified:
branches/release/libs/functional/hash/test/Jamfile.v2 | 2
branches/release/libs/functional/hash/test/compile_time.hpp | 2
branches/release/libs/functional/hash/test/config.hpp | 10 ++++----
branches/release/libs/functional/hash/test/hash_built_in_array_test.cpp | 30 ++++++++++++------------
branches/release/libs/functional/hash/test/hash_complex_test.cpp | 10 ++++----
branches/release/libs/functional/hash/test/hash_custom_test.cpp | 28 +++++++++++-----------
branches/release/libs/functional/hash/test/hash_deque_test.cpp | 10 ++++----
branches/release/libs/functional/hash/test/hash_enum_test.cpp | 12 ++++----
branches/release/libs/functional/hash/test/hash_float_test.hpp | 48 +++++++++++++++++++-------------------
branches/release/libs/functional/hash/test/hash_friend_test.cpp | 28 +++++++++++-----------
branches/release/libs/functional/hash/test/hash_function_pointer_test.cpp | 12 ++++----
branches/release/libs/functional/hash/test/hash_fwd_test.hpp | 22 ++++++++--------
branches/release/libs/functional/hash/test/hash_fwd_test_1.cpp | 36 ++++++++++++++--------------
branches/release/libs/functional/hash/test/hash_fwd_test_2.cpp | 4 +-
branches/release/libs/functional/hash/test/hash_global_namespace_test.cpp | 28 +++++++++++-----------
branches/release/libs/functional/hash/test/hash_list_test.cpp | 10 ++++----
branches/release/libs/functional/hash/test/hash_map_test.cpp | 10 ++++----
branches/release/libs/functional/hash/test/hash_map_test.hpp | 6 ++--
branches/release/libs/functional/hash/test/hash_no_ext_fail_test.cpp | 4 +-
branches/release/libs/functional/hash/test/hash_no_ext_macro_1.cpp | 8 +++---
branches/release/libs/functional/hash/test/hash_no_ext_macro_2.cpp | 8 +++---
branches/release/libs/functional/hash/test/hash_number_test.cpp | 46 ++++++++++++++++++------------------
branches/release/libs/functional/hash/test/hash_pointer_test.cpp | 12 ++++----
branches/release/libs/functional/hash/test/hash_range_test.cpp | 50 ++++++++++++++++++++--------------------
branches/release/libs/functional/hash/test/hash_sequence_test.hpp | 6 ++--
branches/release/libs/functional/hash/test/hash_set_test.cpp | 8 +++---
branches/release/libs/functional/hash/test/hash_set_test.hpp | 6 ++--
branches/release/libs/functional/hash/test/hash_std_array_test.cpp | 6 ++--
branches/release/libs/functional/hash/test/hash_std_smart_ptr_test.cpp | 22 ++++++++--------
branches/release/libs/functional/hash/test/hash_std_tuple_test.cpp | 6 ++--
branches/release/libs/functional/hash/test/hash_string_test.cpp | 38 +++++++++++++++---------------
branches/release/libs/functional/hash/test/hash_type_index_test.cpp | 10 ++++----
branches/release/libs/functional/hash/test/hash_value_array_test.cpp | 24 +++++++++---------
branches/release/libs/functional/hash/test/hash_vector_test.cpp | 10 ++++----
branches/release/libs/functional/hash/test/link_ext_test.cpp | 12 ++++----
branches/release/libs/functional/hash/test/link_no_ext_test.cpp | 4 +-
36 files changed, 294 insertions(+), 294 deletions(-)
Modified: branches/release/libs/functional/hash/test/Jamfile.v2
==============================================================================
--- branches/release/libs/functional/hash/test/Jamfile.v2 (original)
+++ branches/release/libs/functional/hash/test/Jamfile.v2 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -9,7 +9,7 @@
: requirements
<warnings>all
<toolset>intel:<warnings>on
- <toolset>intel:<cxxflags>-strict-ansi
+ #<toolset>intel:<cxxflags>-strict-ansi
<toolset>gcc:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow"
<toolset>darwin:<cxxflags>"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow"
#<toolset>msvc:<warnings-as-errors>on
Modified: branches/release/libs/functional/hash/test/compile_time.hpp
==============================================================================
--- branches/release/libs/functional/hash/test/compile_time.hpp (original)
+++ branches/release/libs/functional/hash/test/compile_time.hpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -11,6 +11,6 @@
void compile_time_tests(T*)
{
BOOST_STATIC_ASSERT((boost::is_base_and_derived<
- std::unary_function<T, std::size_t>, HASH_NAMESPACE::hash<T> >::value));
+ std::unary_function<T, std::size_t>, BOOST_HASH_TEST_NAMESPACE::hash<T> >::value));
}
Modified: branches/release/libs/functional/hash/test/config.hpp
==============================================================================
--- branches/release/libs/functional/hash/test/config.hpp (original)
+++ branches/release/libs/functional/hash/test/config.hpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -3,13 +3,13 @@
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-#if defined(TEST_STD)
-# define TEST_STD_INCLUDES
-# define HASH_NAMESPACE std
+#if defined(BOOST_HASH_TEST_STD)
+# define BOOST_HASH_TEST_STD_INCLUDES
+# define BOOST_HASH_TEST_NAMESPACE std
#else
-# define HASH_NAMESPACE boost
+# define BOOST_HASH_TEST_NAMESPACE boost
# if !defined(BOOST_HASH_NO_EXTENSIONS)
-# define TEST_EXTENSIONS
+# define BOOST_HASH_TEST_EXTENSIONS
# endif
#endif
Modified: branches/release/libs/functional/hash/test/hash_built_in_array_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_built_in_array_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_built_in_array_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,8 +5,8 @@
#include "./config.hpp"
-#ifdef TEST_EXTENSIONS
-# ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_EXTENSIONS
+# ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
# else
# include <boost/functional/hash.hpp>
@@ -15,7 +15,7 @@
#include <boost/detail/lightweight_test.hpp>
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
void array_int_test()
{
@@ -27,47 +27,47 @@
8, -12, 23, 65, 45,
-1, 93, -54, 987, 3
};
- HASH_NAMESPACE::hash<int[25]> hasher1;
+ BOOST_HASH_TEST_NAMESPACE::hash<int[25]> hasher1;
const int length2 = 1;
int array2[1] = {3};
- HASH_NAMESPACE::hash<int[1]> hasher2;
+ BOOST_HASH_TEST_NAMESPACE::hash<int[1]> hasher2;
const int length3 = 2;
int array3[2] = {2, 3};
- HASH_NAMESPACE::hash<int[2]> hasher3;
+ BOOST_HASH_TEST_NAMESPACE::hash<int[2]> hasher3;
BOOST_TEST(hasher1(array1)
- == HASH_NAMESPACE::hash_range(array1, array1 + length1));
+ == BOOST_HASH_TEST_NAMESPACE::hash_range(array1, array1 + length1));
BOOST_TEST(hasher2(array2)
- == HASH_NAMESPACE::hash_range(array2, array2 + length2));
+ == BOOST_HASH_TEST_NAMESPACE::hash_range(array2, array2 + length2));
BOOST_TEST(hasher3(array3)
- == HASH_NAMESPACE::hash_range(array3, array3 + length3));
+ == BOOST_HASH_TEST_NAMESPACE::hash_range(array3, array3 + length3));
}
void two_dimensional_array_test()
{
int array[3][2] = {{-5, 6}, {7, -3}, {26, 1}};
- HASH_NAMESPACE::hash<int[3][2]> hasher;
+ BOOST_HASH_TEST_NAMESPACE::hash<int[3][2]> hasher;
std::size_t seed1 = 0;
for(int i = 0; i < 3; ++i)
{
std::size_t seed2 = 0;
for(int j = 0; j < 2; ++j)
- HASH_NAMESPACE::hash_combine(seed2, array[i][j]);
- HASH_NAMESPACE::hash_combine(seed1, seed2);
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed2, array[i][j]);
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed1, seed2);
}
BOOST_TEST(hasher(array) == seed1);
- BOOST_TEST(hasher(array) == HASH_NAMESPACE::hash_range(array, array + 3));
+ BOOST_TEST(hasher(array) == BOOST_HASH_TEST_NAMESPACE::hash_range(array, array + 3));
}
-#endif // TEST_EXTENSIONS
+#endif // BOOST_HASH_TEST_EXTENSIONS
int main()
{
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
array_int_test();
two_dimensional_array_test();
#endif
Modified: branches/release/libs/functional/hash/test/hash_complex_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_complex_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_complex_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,13 +5,13 @@
#include "./config.hpp"
-#if !defined(TEST_EXTENSIONS)
+#if !defined(BOOST_HASH_TEST_EXTENSIONS)
int main() {}
#else
-#ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
#else
# include <boost/functional/hash.hpp>
@@ -46,11 +46,11 @@
template <class T>
void generic_complex_tests(std::complex<T> v)
{
- HASH_NAMESPACE::hash<std::complex<T> > complex_hasher;
+ BOOST_HASH_TEST_NAMESPACE::hash<std::complex<T> > complex_hasher;
BOOST_TEST(complex_hasher(v) == complex_hasher(v));
- HASH_NAMESPACE::hash<T> real_hasher;
+ BOOST_HASH_TEST_NAMESPACE::hash<T> real_hasher;
T real = v.real();
T imag = v.imag();
@@ -107,4 +107,4 @@
return boost::report_errors();
}
-#endif // TEST_EXTENSIONS
+#endif // BOOST_HASH_TEST_EXTENSIONS
Modified: branches/release/libs/functional/hash/test/hash_custom_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_custom_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_custom_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -41,8 +41,8 @@
#include "./config.hpp"
-#ifdef TEST_EXTENSIONS
-# ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_EXTENSIONS
+# ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
# else
# include <boost/functional/hash.hpp>
@@ -51,7 +51,7 @@
#include <boost/detail/lightweight_test.hpp>
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
#include <vector>
#include <string>
@@ -59,13 +59,13 @@
void custom_tests()
{
- HASH_NAMESPACE::hash<test::custom> custom_hasher;
+ BOOST_HASH_TEST_NAMESPACE::hash<test::custom> custom_hasher;
BOOST_TEST(custom_hasher(10) == 100u);
test::custom x(55);
BOOST_TEST(custom_hasher(x) == 550u);
{
- using namespace HASH_NAMESPACE;
+ using namespace BOOST_HASH_TEST_NAMESPACE;
BOOST_TEST(custom_hasher(x) == hash_value(x));
}
@@ -75,25 +75,25 @@
custom_vector.push_back(35);
std::size_t seed = 0;
- HASH_NAMESPACE::hash_combine(seed, test::custom(5));
- HASH_NAMESPACE::hash_combine(seed, test::custom(25));
- HASH_NAMESPACE::hash_combine(seed, test::custom(35));
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed, test::custom(5));
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed, test::custom(25));
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed, test::custom(35));
std::size_t seed2 = 0;
- HASH_NAMESPACE::hash_combine(seed2, 50u);
- HASH_NAMESPACE::hash_combine(seed2, 250u);
- HASH_NAMESPACE::hash_combine(seed2, 350u);
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed2, 50u);
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed2, 250u);
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed2, 350u);
- BOOST_TEST(seed == HASH_NAMESPACE::hash_range(
+ BOOST_TEST(seed == BOOST_HASH_TEST_NAMESPACE::hash_range(
custom_vector.begin(), custom_vector.end()));
BOOST_TEST(seed == seed2);
}
-#endif // TEST_EXTENSIONS
+#endif // BOOST_HASH_TEST_EXTENSIONS
int main()
{
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
custom_tests();
#endif
return boost::report_errors();
Modified: branches/release/libs/functional/hash/test/hash_deque_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_deque_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_deque_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,8 +5,8 @@
#include "./config.hpp"
-#ifdef TEST_EXTENSIONS
-# ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_EXTENSIONS
+# ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
# else
# include <boost/functional/hash.hpp>
@@ -15,7 +15,7 @@
#include <boost/detail/lightweight_test.hpp>
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
#include <deque>
@@ -23,11 +23,11 @@
#define CONTAINER_TYPE deque
#include "./hash_sequence_test.hpp"
-#endif // TEST_EXTENSIONS
+#endif // BOOST_HASH_TEST_EXTENSIONS
int main()
{
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
deque_tests::deque_hash_integer_tests();
#endif
Modified: branches/release/libs/functional/hash/test/hash_enum_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_enum_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_enum_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,7 +5,7 @@
#include "./config.hpp"
-#ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
#else
# include <boost/functional/hash.hpp>
@@ -31,10 +31,10 @@
compile_time_tests((test::enum4*) 0);
compile_time_tests((test::enum_override*) 0);
- HASH_NAMESPACE::hash<test::enum1> hash1;
- HASH_NAMESPACE::hash<test::enum2> hash2;
- HASH_NAMESPACE::hash<test::enum3> hash3;
- HASH_NAMESPACE::hash<test::enum4> hash4;
+ BOOST_HASH_TEST_NAMESPACE::hash<test::enum1> hash1;
+ BOOST_HASH_TEST_NAMESPACE::hash<test::enum2> hash2;
+ BOOST_HASH_TEST_NAMESPACE::hash<test::enum3> hash3;
+ BOOST_HASH_TEST_NAMESPACE::hash<test::enum4> hash4;
BOOST_TEST(hash1(test::enum1a) == hash1(test::enum1a));
@@ -50,7 +50,7 @@
BOOST_TEST(hash4(test::enum4a) != hash4(test::enum4b));
BOOST_TEST(hash4(test::enum4b) == hash4(test::enum4b));
- HASH_NAMESPACE::hash<test::enum_override> hash_override;
+ BOOST_HASH_TEST_NAMESPACE::hash<test::enum_override> hash_override;
BOOST_TEST(hash_override(test::enum_override1) ==
hash_override(test::enum_override1));
Modified: branches/release/libs/functional/hash/test/hash_float_test.hpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_float_test.hpp (original)
+++ branches/release/libs/functional/hash/test/hash_float_test.hpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,7 +5,7 @@
#include "./config.hpp"
-#ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
#else
# include <boost/functional/hash.hpp>
@@ -43,7 +43,7 @@
{
std::cerr
<< "\n"
- << "Testing " BOOST_STRINGIZE(HASH_NAMESPACE) "::hash<"
+ << "Testing " BOOST_STRINGIZE(BOOST_HASH_TEST_NAMESPACE) "::hash<"
<< name
<< ">\n"
<< "\n"
@@ -70,7 +70,7 @@
<< "\n"
;
- HASH_NAMESPACE::hash<T> x1;
+ BOOST_HASH_TEST_NAMESPACE::hash<T> x1;
T zero = 0;
T minus_zero = (T) -1 * zero;
@@ -78,9 +78,9 @@
BOOST_TEST(zero == minus_zero);
BOOST_TEST(x1(zero) == x1(minus_zero));
-#if defined(TEST_EXTENSIONS)
- BOOST_TEST(x1(zero) == HASH_NAMESPACE::hash_value(zero));
- BOOST_TEST(x1(minus_zero) == HASH_NAMESPACE::hash_value(minus_zero));
+#if defined(BOOST_HASH_TEST_EXTENSIONS)
+ BOOST_TEST(x1(zero) == BOOST_HASH_TEST_NAMESPACE::hash_value(zero));
+ BOOST_TEST(x1(minus_zero) == BOOST_HASH_TEST_NAMESPACE::hash_value(minus_zero));
#endif
BOOST_TEST(x1(zero) != x1(0.5));
@@ -106,10 +106,10 @@
T minus_infinity2 = (T) -1. / zero;
T minus_infinity3 = (T) 1. / minus_zero;
-#if defined(TEST_EXTENSIONS)
- BOOST_TEST(x1(infinity) == HASH_NAMESPACE::hash_value(infinity));
+#if defined(BOOST_HASH_TEST_EXTENSIONS)
+ BOOST_TEST(x1(infinity) == BOOST_HASH_TEST_NAMESPACE::hash_value(infinity));
BOOST_TEST(x1(minus_infinity)
- == HASH_NAMESPACE::hash_value(minus_infinity));
+ == BOOST_HASH_TEST_NAMESPACE::hash_value(minus_infinity));
#endif
if(infinity == infinity2)
@@ -191,12 +191,12 @@
BOOST_TEST(three_quarter_max != -three_quarter_max);
-#if defined(TEST_EXTENSIONS)
- BOOST_TEST(x1(max) == HASH_NAMESPACE::hash_value(max));
- BOOST_TEST(x1(half_max) == HASH_NAMESPACE::hash_value(half_max));
- BOOST_TEST(x1(quarter_max) == HASH_NAMESPACE::hash_value(quarter_max));
+#if defined(BOOST_HASH_TEST_EXTENSIONS)
+ BOOST_TEST(x1(max) == BOOST_HASH_TEST_NAMESPACE::hash_value(max));
+ BOOST_TEST(x1(half_max) == BOOST_HASH_TEST_NAMESPACE::hash_value(half_max));
+ BOOST_TEST(x1(quarter_max) == BOOST_HASH_TEST_NAMESPACE::hash_value(quarter_max));
BOOST_TEST(x1(three_quarter_max) ==
- HASH_NAMESPACE::hash_value(three_quarter_max));
+ BOOST_HASH_TEST_NAMESPACE::hash_value(three_quarter_max));
#endif
// The '!=' tests could legitimately fail, but with my hash it indicates a
@@ -227,16 +227,16 @@
if(v1 == v2)
BOOST_TEST(x1(v1) == x1(v2));
-#if defined(TEST_EXTENSIONS)
- BOOST_TEST(x1(v1) == HASH_NAMESPACE::hash_value(v1));
- BOOST_TEST(x1(v2) == HASH_NAMESPACE::hash_value(v2));
+#if defined(BOOST_HASH_TEST_EXTENSIONS)
+ BOOST_TEST(x1(v1) == BOOST_HASH_TEST_NAMESPACE::hash_value(v1));
+ BOOST_TEST(x1(v2) == BOOST_HASH_TEST_NAMESPACE::hash_value(v2));
#endif
#endif
-#if defined(TEST_EXTENSIONS)
+#if defined(BOOST_HASH_TEST_EXTENSIONS)
BOOST_TEST(x1(boost::hash_detail::limits<T>::epsilon()) ==
- HASH_NAMESPACE::hash_value(
+ BOOST_HASH_TEST_NAMESPACE::hash_value(
boost::hash_detail::limits<T>::epsilon()));
#endif
@@ -269,12 +269,12 @@
if(x1(boost::hash_detail::limits<T>::denorm_min()) == x1(zero)) {
std::cerr<<"x1(denorm_min) == x1(zero) == "<<x1(zero)<<"\n";
}
-#if !BOOST_WORKAROUND(__DECCXX_VER,<70190006) && defined(TEST_EXTENSIONS)
+#if !BOOST_WORKAROUND(__DECCXX_VER,<70190006) && defined(BOOST_HASH_TEST_EXTENSIONS)
// The Tru64/CXX standard library prior to 7.1 contains a bug in the
// specialization of boost::hash_detail::limits::denorm_min() for long
// doubles which causes this test to fail.
if(x1(boost::hash_detail::limits<T>::denorm_min()) !=
- HASH_NAMESPACE::hash_value(
+ BOOST_HASH_TEST_NAMESPACE::hash_value(
boost::hash_detail::limits<T>::denorm_min()))
{
std::cerr
@@ -282,7 +282,7 @@
<< x1(boost::hash_detail::limits<T>::denorm_min())
<< "\nhash_value(boost::hash_detail::limits<T>::denorm_min())"
" = "
- << HASH_NAMESPACE::hash_value(
+ << BOOST_HASH_TEST_NAMESPACE::hash_value(
boost::hash_detail::limits<T>::denorm_min())
<< "\nx1(0) = "
<< x1(0)
@@ -292,13 +292,13 @@
}
// NaN also causes borland to crash.
-#if !defined(__BORLANDC__) && defined(TEST_EXTENSIONS)
+#if !defined(__BORLANDC__) && defined(BOOST_HASH_TEST_EXTENSIONS)
if(boost::hash_detail::limits<T>::has_quiet_NaN) {
if(x1(boost::hash_detail::limits<T>::quiet_NaN()) == x1(1.0)) {
std::cerr<<"x1(quiet_NaN) == x1(1.0) == "<<x1(1.0)<<"\n";
}
BOOST_TEST(x1(boost::hash_detail::limits<T>::quiet_NaN()) ==
- HASH_NAMESPACE::hash_value(
+ BOOST_HASH_TEST_NAMESPACE::hash_value(
boost::hash_detail::limits<T>::quiet_NaN()));
}
#endif
Modified: branches/release/libs/functional/hash/test/hash_friend_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_friend_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_friend_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -44,8 +44,8 @@
#include "./config.hpp"
-#ifdef TEST_EXTENSIONS
-# ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_EXTENSIONS
+# ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
# else
# include <boost/functional/hash.hpp>
@@ -54,7 +54,7 @@
#include <boost/detail/lightweight_test.hpp>
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
#include <vector>
#include <string>
@@ -62,13 +62,13 @@
void custom_tests()
{
- HASH_NAMESPACE::hash<test::custom<int> > custom_hasher;
+ BOOST_HASH_TEST_NAMESPACE::hash<test::custom<int> > custom_hasher;
BOOST_TEST(custom_hasher(10) == 100u);
test::custom<int> x(55);
BOOST_TEST(custom_hasher(x) == 550u);
{
- using namespace HASH_NAMESPACE;
+ using namespace BOOST_HASH_TEST_NAMESPACE;
BOOST_TEST(custom_hasher(x) == hash_value(x));
}
@@ -78,25 +78,25 @@
custom_vector.push_back(35);
std::size_t seed = 0;
- HASH_NAMESPACE::hash_combine(seed, test::custom<int>(5));
- HASH_NAMESPACE::hash_combine(seed, test::custom<int>(25));
- HASH_NAMESPACE::hash_combine(seed, test::custom<int>(35));
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed, test::custom<int>(5));
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed, test::custom<int>(25));
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed, test::custom<int>(35));
std::size_t seed2 = 0;
- HASH_NAMESPACE::hash_combine(seed2, 50u);
- HASH_NAMESPACE::hash_combine(seed2, 250u);
- HASH_NAMESPACE::hash_combine(seed2, 350u);
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed2, 50u);
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed2, 250u);
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed2, 350u);
- BOOST_TEST(seed == HASH_NAMESPACE::hash_range(
+ BOOST_TEST(seed == BOOST_HASH_TEST_NAMESPACE::hash_range(
custom_vector.begin(), custom_vector.end()));
BOOST_TEST(seed == seed2);
}
-#endif // TEST_EXTENSIONS
+#endif // BOOST_HASH_TEST_EXTENSIONS
int main()
{
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
custom_tests();
#endif
return boost::report_errors();
Modified: branches/release/libs/functional/hash/test/hash_function_pointer_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_function_pointer_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_function_pointer_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,7 +5,7 @@
#include "./config.hpp"
-#ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
#else
# include <boost/functional/hash.hpp>
@@ -24,8 +24,8 @@
compile_time_tests((void(**)()) 0);
compile_time_tests((int(**)(int)) 0);
- HASH_NAMESPACE::hash<void(*)()> hasher_void;
- HASH_NAMESPACE::hash<int(*)(int)> hasher_int;
+ BOOST_HASH_TEST_NAMESPACE::hash<void(*)()> hasher_void;
+ BOOST_HASH_TEST_NAMESPACE::hash<int(*)(int)> hasher_int;
BOOST_TEST(&void_func1 != &void_func2);
BOOST_TEST(&int_func1 != &int_func2);
@@ -38,11 +38,11 @@
BOOST_TEST(hasher_int(&int_func1) == hasher_int(&int_func1));
BOOST_TEST(hasher_int(&int_func1) != hasher_int(&int_func2));
BOOST_TEST(hasher_int(&int_func1) != hasher_int(0));
-#if defined(TEST_EXTENSIONS)
+#if defined(BOOST_HASH_TEST_EXTENSIONS)
BOOST_TEST(hasher_void(&void_func1)
- == HASH_NAMESPACE::hash_value(&void_func1));
+ == BOOST_HASH_TEST_NAMESPACE::hash_value(&void_func1));
BOOST_TEST(hasher_int(&int_func1)
- == HASH_NAMESPACE::hash_value(&int_func1));
+ == BOOST_HASH_TEST_NAMESPACE::hash_value(&int_func1));
// This isn't specified in Peter's proposal:
BOOST_TEST(hasher_void(0) == 0);
Modified: branches/release/libs/functional/hash/test/hash_fwd_test.hpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_fwd_test.hpp (original)
+++ branches/release/libs/functional/hash/test/hash_fwd_test.hpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,7 +5,7 @@
#include "./config.hpp"
-#if defined(TEST_EXTENSIONS) && !defined(TEST_STD_INCLUDES)
+#if defined(BOOST_HASH_TEST_EXTENSIONS) && !defined(BOOST_HASH_TEST_STD_INCLUDES)
#include <boost/functional/hash_fwd.hpp>
#include <boost/config.hpp>
@@ -25,7 +25,7 @@
template <class T>
std::size_t hash_value(test_type1<T> const& x)
{
- HASH_NAMESPACE::hash<T> hasher;
+ BOOST_HASH_TEST_NAMESPACE::hash<T> hasher;
return hasher(x.value);
}
#endif
@@ -42,8 +42,8 @@
std::size_t hash_value(test_type2<T> const& x)
{
std::size_t seed = 0;
- HASH_NAMESPACE::hash_combine(seed, x.value1);
- HASH_NAMESPACE::hash_combine(seed, x.value2);
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed, x.value1);
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed, x.value2);
return seed;
}
#endif
@@ -61,8 +61,8 @@
std::size_t hash_value(test_type3<T> const& x)
{
std::size_t seed =
- HASH_NAMESPACE::hash_range(x.values.begin(), x.values.end());
- HASH_NAMESPACE::hash_range(seed, x.values.begin(), x.values.end());
+ BOOST_HASH_TEST_NAMESPACE::hash_range(x.values.begin(), x.values.end());
+ BOOST_HASH_TEST_NAMESPACE::hash_range(seed, x.values.begin(), x.values.end());
return seed;
}
#endif
@@ -76,7 +76,7 @@
template <class T>
std::size_t hash_value(test::test_type1<T> const& x)
{
- HASH_NAMESPACE::hash<T> hasher;
+ BOOST_HASH_TEST_NAMESPACE::hash<T> hasher;
return hasher(x.value);
}
@@ -84,8 +84,8 @@
std::size_t hash_value(test::test_type2<T> const& x)
{
std::size_t seed = 0;
- HASH_NAMESPACE::hash_combine(seed, x.value1);
- HASH_NAMESPACE::hash_combine(seed, x.value2);
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed, x.value1);
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed, x.value2);
return seed;
}
@@ -93,8 +93,8 @@
std::size_t hash_value(test::test_type3<T> const& x)
{
std::size_t seed =
- HASH_NAMESPACE::hash_range(x.values.begin(), x.values.end());
- HASH_NAMESPACE::hash_range(seed, x.values.begin(), x.values.end());
+ BOOST_HASH_TEST_NAMESPACE::hash_range(x.values.begin(), x.values.end());
+ BOOST_HASH_TEST_NAMESPACE::hash_range(seed, x.values.begin(), x.values.end());
return seed;
}
}
Modified: branches/release/libs/functional/hash/test/hash_fwd_test_1.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_fwd_test_1.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_fwd_test_1.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -11,7 +11,7 @@
#include <boost/detail/lightweight_test.hpp>
-#if defined(TEST_EXTENSIONS) && !defined(TEST_STD_INCLUDES)
+#if defined(BOOST_HASH_TEST_EXTENSIONS) && !defined(BOOST_HASH_TEST_STD_INCLUDES)
#include <boost/functional/hash.hpp>
#include <string>
@@ -21,10 +21,10 @@
test::test_type1<int> x(5);
test::test_type1<std::string> y("Test");
- HASH_NAMESPACE::hash<int> hasher_int;
- HASH_NAMESPACE::hash<std::string> hasher_string;
- HASH_NAMESPACE::hash<test::test_type1<int> > hasher_test_int;
- HASH_NAMESPACE::hash<test::test_type1<std::string> > hasher_test_string;
+ BOOST_HASH_TEST_NAMESPACE::hash<int> hasher_int;
+ BOOST_HASH_TEST_NAMESPACE::hash<std::string> hasher_string;
+ BOOST_HASH_TEST_NAMESPACE::hash<test::test_type1<int> > hasher_test_int;
+ BOOST_HASH_TEST_NAMESPACE::hash<test::test_type1<std::string> > hasher_test_string;
BOOST_TEST(hasher_int(5) == hasher_test_int(x));
BOOST_TEST(hasher_string("Test") == hasher_test_string(y));
@@ -36,15 +36,15 @@
test::test_type2<std::string> y("Test1", "Test2");
std::size_t seed1 = 0;
- HASH_NAMESPACE::hash_combine(seed1, 5);
- HASH_NAMESPACE::hash_combine(seed1, 10);
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed1, 5);
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed1, 10);
std::size_t seed2 = 0;
- HASH_NAMESPACE::hash_combine(seed2, std::string("Test1"));
- HASH_NAMESPACE::hash_combine(seed2, std::string("Test2"));
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed2, std::string("Test1"));
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed2, std::string("Test2"));
- HASH_NAMESPACE::hash<test::test_type2<int> > hasher_test_int;
- HASH_NAMESPACE::hash<test::test_type2<std::string> > hasher_test_string;
+ BOOST_HASH_TEST_NAMESPACE::hash<test::test_type2<int> > hasher_test_int;
+ BOOST_HASH_TEST_NAMESPACE::hash<test::test_type2<std::string> > hasher_test_string;
BOOST_TEST(seed1 == hasher_test_int(x));
BOOST_TEST(seed2 == hasher_test_string(y));
@@ -69,15 +69,15 @@
test::test_type3<std::string> y(values2.begin(), values2.end());
std::size_t seed1 =
- HASH_NAMESPACE::hash_range(values1.begin(), values1.end());
- HASH_NAMESPACE::hash_range(seed1, values1.begin(), values1.end());
+ BOOST_HASH_TEST_NAMESPACE::hash_range(values1.begin(), values1.end());
+ BOOST_HASH_TEST_NAMESPACE::hash_range(seed1, values1.begin(), values1.end());
std::size_t seed2 =
- HASH_NAMESPACE::hash_range(values2.begin(), values2.end());
- HASH_NAMESPACE::hash_range(seed2, values2.begin(), values2.end());
+ BOOST_HASH_TEST_NAMESPACE::hash_range(values2.begin(), values2.end());
+ BOOST_HASH_TEST_NAMESPACE::hash_range(seed2, values2.begin(), values2.end());
- HASH_NAMESPACE::hash<test::test_type3<int> > hasher_test_int;
- HASH_NAMESPACE::hash<test::test_type3<std::string> > hasher_test_string;
+ BOOST_HASH_TEST_NAMESPACE::hash<test::test_type3<int> > hasher_test_int;
+ BOOST_HASH_TEST_NAMESPACE::hash<test::test_type3<std::string> > hasher_test_string;
BOOST_TEST(seed1 == hasher_test_int(x));
BOOST_TEST(seed2 == hasher_test_string(y));
@@ -87,7 +87,7 @@
int main()
{
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
fwd_test1();
fwd_test2();
fwd_test3();
Modified: branches/release/libs/functional/hash/test/hash_fwd_test_2.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_fwd_test_2.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_fwd_test_2.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -8,7 +8,7 @@
#include "./config.hpp"
-#if !defined(TEST_EXTENSIONS) || defined(TEST_STD_INCLUDES)
+#if !defined(BOOST_HASH_TEST_EXTENSIONS) || defined(BOOST_HASH_TEST_STD_INCLUDES)
int main() {}
@@ -44,4 +44,4 @@
return boost::report_errors();
}
-#endif // defined(TEST_EXTENSIONS) && !defined(TEST_STD_INCLUDES)
+#endif // defined(BOOST_HASH_TEST_EXTENSIONS) && !defined(BOOST_HASH_TEST_STD_INCLUDES)
Modified: branches/release/libs/functional/hash/test/hash_global_namespace_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_global_namespace_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_global_namespace_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -42,8 +42,8 @@
#include "./config.hpp"
-#ifdef TEST_EXTENSIONS
-# ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_EXTENSIONS
+# ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
# else
# include <boost/functional/hash.hpp>
@@ -52,7 +52,7 @@
#include <boost/detail/lightweight_test.hpp>
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
#include <vector>
#include <string>
@@ -60,13 +60,13 @@
void custom_tests()
{
- HASH_NAMESPACE::hash<custom> custom_hasher;
+ BOOST_HASH_TEST_NAMESPACE::hash<custom> custom_hasher;
BOOST_TEST(custom_hasher(10) == 100u);
custom x(55);
BOOST_TEST(custom_hasher(x) == 550u);
{
- using namespace HASH_NAMESPACE;
+ using namespace BOOST_HASH_TEST_NAMESPACE;
BOOST_TEST(custom_hasher(x) == hash_value(x));
}
@@ -76,26 +76,26 @@
custom_vector.push_back(35);
std::size_t seed = 0;
- HASH_NAMESPACE::hash_combine(seed, custom(5));
- HASH_NAMESPACE::hash_combine(seed, custom(25));
- HASH_NAMESPACE::hash_combine(seed, custom(35));
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed, custom(5));
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed, custom(25));
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed, custom(35));
std::size_t seed2 = 0;
- HASH_NAMESPACE::hash_combine(seed2, 50u);
- HASH_NAMESPACE::hash_combine(seed2, 250u);
- HASH_NAMESPACE::hash_combine(seed2, 350u);
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed2, 50u);
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed2, 250u);
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(seed2, 350u);
- BOOST_TEST(seed == HASH_NAMESPACE::hash_range(
+ BOOST_TEST(seed == BOOST_HASH_TEST_NAMESPACE::hash_range(
custom_vector.begin(), custom_vector.end()));
BOOST_TEST(seed == seed2);
}
-#endif // TEST_EXTENSIONS
+#endif // BOOST_HASH_TEST_EXTENSIONS
int main()
{
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
custom_tests();
#endif
return boost::report_errors();
Modified: branches/release/libs/functional/hash/test/hash_list_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_list_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_list_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,8 +5,8 @@
#include "./config.hpp"
-#ifdef TEST_EXTENSIONS
-# ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_EXTENSIONS
+# ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
# else
# include <boost/functional/hash.hpp>
@@ -15,7 +15,7 @@
#include <boost/detail/lightweight_test.hpp>
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
#include <list>
@@ -23,11 +23,11 @@
#define CONTAINER_TYPE list
#include "./hash_sequence_test.hpp"
-#endif // TEST_EXTENSIONS
+#endif // BOOST_HASH_TEST_EXTENSIONS
int main()
{
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
list_tests::list_hash_integer_tests();
#endif
Modified: branches/release/libs/functional/hash/test/hash_map_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_map_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_map_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,8 +5,8 @@
#include "./config.hpp"
-#ifdef TEST_EXTENSIONS
-# ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_EXTENSIONS
+# ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
# else
# include <boost/functional/hash.hpp>
@@ -17,7 +17,7 @@
#include <map>
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
using std::map;
#define CONTAINER_TYPE map
@@ -27,11 +27,11 @@
#define CONTAINER_TYPE multimap
#include "./hash_map_test.hpp"
-#endif // TEST_EXTENSIONS
+#endif // BOOST_HASH_TEST_EXTENSIONS
int main()
{
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
map_tests::map_hash_integer_tests();
multimap_tests::multimap_hash_integer_tests();
#endif
Modified: branches/release/libs/functional/hash/test/hash_map_test.hpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_map_test.hpp (original)
+++ branches/release/libs/functional/hash/test/hash_map_test.hpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -38,16 +38,16 @@
containers[9].insert(pair(key(-1),value(3)));
containers[9].insert(pair(key(-1),value(3)));
- HASH_NAMESPACE::hash<T> hasher;
+ BOOST_HASH_TEST_NAMESPACE::hash<T> hasher;
for(int i2 = 0; i2 < number_of_containers; ++i2) {
BOOST_TEST(hasher(containers[i2]) == hasher(containers[i2]));
BOOST_TEST(hasher(containers[i2]) ==
- HASH_NAMESPACE::hash_value(containers[i2]));
+ BOOST_HASH_TEST_NAMESPACE::hash_value(containers[i2]));
BOOST_TEST(hasher(containers[i2])
- == HASH_NAMESPACE::hash_range(
+ == BOOST_HASH_TEST_NAMESPACE::hash_range(
containers[i2].begin(), containers[i2].end()));
for(int j2 = i2 + 1; j2 < number_of_containers; ++j2) {
Modified: branches/release/libs/functional/hash/test/hash_no_ext_fail_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_no_ext_fail_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_no_ext_fail_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -11,7 +11,7 @@
# define BOOST_HASH_NO_EXTENSIONS
#endif
-#ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
#else
# include <boost/functional/hash.hpp>
@@ -21,7 +21,7 @@
int main()
{
- HASH_NAMESPACE::hash< int[10] > hasher;
+ BOOST_HASH_TEST_NAMESPACE::hash< int[10] > hasher;
ignore(hasher);
return 0;
Modified: branches/release/libs/functional/hash/test/hash_no_ext_macro_1.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_no_ext_macro_1.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_no_ext_macro_1.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,7 +5,7 @@
#include "./config.hpp"
-#if defined(TEST_EXTENSIONS)
+#if defined(BOOST_HASH_TEST_EXTENSIONS)
// Include header without BOOST_HASH_NO_EXTENSIONS defined
# if defined(BOOST_HASH_NO_EXTENSIONS)
@@ -23,14 +23,14 @@
int main()
{
-#if defined(TEST_EXTENSIONS)
+#if defined(BOOST_HASH_TEST_EXTENSIONS)
std::deque<int> x;
x.push_back(1);
x.push_back(2);
- HASH_NAMESPACE::hash<std::deque<int> > hasher;
- BOOST_TEST(hasher(x) == HASH_NAMESPACE::hash_value(x));
+ BOOST_HASH_TEST_NAMESPACE::hash<std::deque<int> > hasher;
+ BOOST_TEST(hasher(x) == BOOST_HASH_TEST_NAMESPACE::hash_value(x));
#endif
return boost::report_errors();
Modified: branches/release/libs/functional/hash/test/hash_no_ext_macro_2.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_no_ext_macro_2.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_no_ext_macro_2.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,7 +5,7 @@
#include "./config.hpp"
-#if defined(TEST_EXTENSIONS)
+#if defined(BOOST_HASH_TEST_EXTENSIONS)
// Include header with BOOST_HASH_NO_EXTENSIONS defined
# if !defined(BOOST_HASH_NO_EXTENSIONS)
@@ -23,14 +23,14 @@
int main()
{
-#if defined(TEST_EXTENSIONS)
+#if defined(BOOST_HASH_TEST_EXTENSIONS)
std::map<int, int> x;
x.insert(std::map<int, int>::value_type(53, -42));
x.insert(std::map<int, int>::value_type(14, -75));
- HASH_NAMESPACE::hash<std::map<int, int> > hasher;
- BOOST_TEST(hasher(x) == HASH_NAMESPACE::hash_value(x));
+ BOOST_HASH_TEST_NAMESPACE::hash<std::map<int, int> > hasher;
+ BOOST_TEST(hasher(x) == BOOST_HASH_TEST_NAMESPACE::hash_value(x));
#endif
return boost::report_errors();
Modified: branches/release/libs/functional/hash/test/hash_number_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_number_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_number_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,7 +5,7 @@
#include "./config.hpp"
-#ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
#else
# include <boost/functional/hash.hpp>
@@ -41,11 +41,11 @@
if(limits::is_signed ||
limits::digits <= boost::hash_detail::limits<std::size_t>::digits)
{
- BOOST_TEST(HASH_NAMESPACE::hash_value(T(-5)) == (std::size_t)T(-5));
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_value(T(-5)) == (std::size_t)T(-5));
}
- BOOST_TEST(HASH_NAMESPACE::hash_value(T(0)) == (std::size_t)T(0u));
- BOOST_TEST(HASH_NAMESPACE::hash_value(T(10)) == (std::size_t)T(10u));
- BOOST_TEST(HASH_NAMESPACE::hash_value(T(25)) == (std::size_t)T(25u));
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_value(T(0)) == (std::size_t)T(0u));
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_value(T(10)) == (std::size_t)T(10u));
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_value(T(25)) == (std::size_t)T(25u));
}
template <class T>
@@ -62,8 +62,8 @@
compile_time_tests((T*) 0);
- HASH_NAMESPACE::hash<T> x1;
- HASH_NAMESPACE::hash<T> x2;
+ BOOST_HASH_TEST_NAMESPACE::hash<T> x1;
+ BOOST_HASH_TEST_NAMESPACE::hash<T> x2;
T v1 = (T) -5;
BOOST_TEST(x1(v1) == x2(v1));
@@ -74,11 +74,11 @@
BOOST_TEST(x1(T(5) - T(5)) == x2(T(0)));
BOOST_TEST(x1(T(6) + T(4)) == x2(T(10)));
-#if defined(TEST_EXTENSIONS)
- BOOST_TEST(x1(T(-5)) == HASH_NAMESPACE::hash_value(T(-5)));
- BOOST_TEST(x1(T(0)) == HASH_NAMESPACE::hash_value(T(0)));
- BOOST_TEST(x1(T(10)) == HASH_NAMESPACE::hash_value(T(10)));
- BOOST_TEST(x1(T(25)) == HASH_NAMESPACE::hash_value(T(25)));
+#if defined(BOOST_HASH_TEST_EXTENSIONS)
+ BOOST_TEST(x1(T(-5)) == BOOST_HASH_TEST_NAMESPACE::hash_value(T(-5)));
+ BOOST_TEST(x1(T(0)) == BOOST_HASH_TEST_NAMESPACE::hash_value(T(0)));
+ BOOST_TEST(x1(T(10)) == BOOST_HASH_TEST_NAMESPACE::hash_value(T(10)));
+ BOOST_TEST(x1(T(25)) == BOOST_HASH_TEST_NAMESPACE::hash_value(T(25)));
numeric_extra_tests<T>();
#endif
@@ -91,8 +91,8 @@
if(limits::is_specialized)
{
- HASH_NAMESPACE::hash<T> x1;
- HASH_NAMESPACE::hash<T> x2;
+ BOOST_HASH_TEST_NAMESPACE::hash<T> x1;
+ BOOST_HASH_TEST_NAMESPACE::hash<T> x2;
T min_value = (limits::min)();
T max_value = (limits::max)();
@@ -100,15 +100,15 @@
BOOST_TEST(x1(min_value) == x2((limits::min)()));
BOOST_TEST(x1(max_value) == x2((limits::max)()));
-#if defined(TEST_EXTENSIONS)
- BOOST_TEST(x1(min_value) == HASH_NAMESPACE::hash_value(min_value));
- BOOST_TEST(x1(max_value) == HASH_NAMESPACE::hash_value(max_value));
+#if defined(BOOST_HASH_TEST_EXTENSIONS)
+ BOOST_TEST(x1(min_value) == BOOST_HASH_TEST_NAMESPACE::hash_value(min_value));
+ BOOST_TEST(x1(max_value) == BOOST_HASH_TEST_NAMESPACE::hash_value(max_value));
if (limits::is_integer)
{
- BOOST_TEST(HASH_NAMESPACE::hash_value(min_value)
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_value(min_value)
== std::size_t(min_value));
- BOOST_TEST(HASH_NAMESPACE::hash_value(max_value)
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_value(max_value)
== std::size_t(max_value));
}
#endif
@@ -120,8 +120,8 @@
{
typedef boost::hash_detail::limits<T> limits;
- HASH_NAMESPACE::hash<T> x1;
- HASH_NAMESPACE::hash<T> x2;
+ BOOST_HASH_TEST_NAMESPACE::hash<T> x1;
+ BOOST_HASH_TEST_NAMESPACE::hash<T> x2;
// A hash function can legally fail these tests, but it'll not be a good
// sign.
@@ -136,8 +136,8 @@
void bool_test()
{
- HASH_NAMESPACE::hash<bool> x1;
- HASH_NAMESPACE::hash<bool> x2;
+ BOOST_HASH_TEST_NAMESPACE::hash<bool> x1;
+ BOOST_HASH_TEST_NAMESPACE::hash<bool> x2;
BOOST_TEST(x1(true) == x2(true));
BOOST_TEST(x1(false) == x2(false));
Modified: branches/release/libs/functional/hash/test/hash_pointer_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_pointer_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_pointer_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,7 +5,7 @@
#include "./config.hpp"
-#ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
#else
# include <boost/functional/hash.hpp>
@@ -20,8 +20,8 @@
compile_time_tests((int**) 0);
compile_time_tests((void**) 0);
- HASH_NAMESPACE::hash<int*> x1;
- HASH_NAMESPACE::hash<int*> x2;
+ BOOST_HASH_TEST_NAMESPACE::hash<int*> x1;
+ BOOST_HASH_TEST_NAMESPACE::hash<int*> x2;
int int1;
int int2;
@@ -29,9 +29,9 @@
BOOST_TEST(x1(0) == x2(0));
BOOST_TEST(x1(&int1) == x2(&int1));
BOOST_TEST(x1(&int2) == x2(&int2));
-#if defined(TEST_EXTENSIONS)
- BOOST_TEST(x1(&int1) == HASH_NAMESPACE::hash_value(&int1));
- BOOST_TEST(x1(&int2) == HASH_NAMESPACE::hash_value(&int2));
+#if defined(BOOST_HASH_TEST_EXTENSIONS)
+ BOOST_TEST(x1(&int1) == BOOST_HASH_TEST_NAMESPACE::hash_value(&int1));
+ BOOST_TEST(x1(&int2) == BOOST_HASH_TEST_NAMESPACE::hash_value(&int2));
// This isn't specified in Peter's proposal:
BOOST_TEST(x1(0) == 0);
Modified: branches/release/libs/functional/hash/test/hash_range_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_range_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_range_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,13 +5,13 @@
#include "./config.hpp"
-#if !defined(TEST_EXTENSIONS)
+#if !defined(BOOST_HASH_TEST_EXTENSIONS)
int main() {}
#else
-#ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
#else
# include <boost/functional/hash.hpp>
@@ -40,39 +40,39 @@
std::vector<int> x;
std::size_t x_seed = 0;
- BOOST_TEST(x_seed == HASH_NAMESPACE::hash_range(x.begin(), x.end()));
+ BOOST_TEST(x_seed == BOOST_HASH_TEST_NAMESPACE::hash_range(x.begin(), x.end()));
- BOOST_TEST(HASH_NAMESPACE::hash_range(empty.begin(), empty.end())
- == HASH_NAMESPACE::hash_range(x.begin(), x.end()));
- BOOST_TEST(HASH_NAMESPACE::hash_range(empty.begin(), empty.end())
- != HASH_NAMESPACE::hash_range(values1.begin(), values1.end()));
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_range(empty.begin(), empty.end())
+ == BOOST_HASH_TEST_NAMESPACE::hash_range(x.begin(), x.end()));
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_range(empty.begin(), empty.end())
+ != BOOST_HASH_TEST_NAMESPACE::hash_range(values1.begin(), values1.end()));
x.push_back(10);
- HASH_NAMESPACE::hash_combine(x_seed, 10);
- BOOST_TEST(x_seed == HASH_NAMESPACE::hash_range(x.begin(), x.end()));
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(x_seed, 10);
+ BOOST_TEST(x_seed == BOOST_HASH_TEST_NAMESPACE::hash_range(x.begin(), x.end()));
- BOOST_TEST(HASH_NAMESPACE::hash_range(empty.begin(), empty.end())
- != HASH_NAMESPACE::hash_range(x.begin(), x.end()));
- BOOST_TEST(HASH_NAMESPACE::hash_range(values2.begin(), values2.end())
- == HASH_NAMESPACE::hash_range(x.begin(), x.end()));
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_range(empty.begin(), empty.end())
+ != BOOST_HASH_TEST_NAMESPACE::hash_range(x.begin(), x.end()));
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_range(values2.begin(), values2.end())
+ == BOOST_HASH_TEST_NAMESPACE::hash_range(x.begin(), x.end()));
x.push_back(20);
- HASH_NAMESPACE::hash_combine(x_seed, 20);
- BOOST_TEST(x_seed == HASH_NAMESPACE::hash_range(x.begin(), x.end()));
+ BOOST_HASH_TEST_NAMESPACE::hash_combine(x_seed, 20);
+ BOOST_TEST(x_seed == BOOST_HASH_TEST_NAMESPACE::hash_range(x.begin(), x.end()));
- BOOST_TEST(HASH_NAMESPACE::hash_range(empty.begin(), empty.end())
- != HASH_NAMESPACE::hash_range(x.begin(), x.end()));
- BOOST_TEST(HASH_NAMESPACE::hash_range(values2.begin(), values2.end())
- != HASH_NAMESPACE::hash_range(x.begin(), x.end()));
- BOOST_TEST(HASH_NAMESPACE::hash_range(values3.begin(), values3.end())
- == HASH_NAMESPACE::hash_range(x.begin(), x.end()));
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_range(empty.begin(), empty.end())
+ != BOOST_HASH_TEST_NAMESPACE::hash_range(x.begin(), x.end()));
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_range(values2.begin(), values2.end())
+ != BOOST_HASH_TEST_NAMESPACE::hash_range(x.begin(), x.end()));
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_range(values3.begin(), values3.end())
+ == BOOST_HASH_TEST_NAMESPACE::hash_range(x.begin(), x.end()));
std::size_t seed =
- HASH_NAMESPACE::hash_range(values3.begin(), values3.end());
- HASH_NAMESPACE::hash_range(seed, values4.begin(), values4.end());
- HASH_NAMESPACE::hash_range(seed, x.begin(), x.end());
+ BOOST_HASH_TEST_NAMESPACE::hash_range(values3.begin(), values3.end());
+ BOOST_HASH_TEST_NAMESPACE::hash_range(seed, values4.begin(), values4.end());
+ BOOST_HASH_TEST_NAMESPACE::hash_range(seed, x.begin(), x.end());
BOOST_TEST(seed ==
- HASH_NAMESPACE::hash_range(values5.begin(), values5.end()));
+ BOOST_HASH_TEST_NAMESPACE::hash_range(values5.begin(), values5.end()));
}
int main()
Modified: branches/release/libs/functional/hash/test/hash_sequence_test.hpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_sequence_test.hpp (original)
+++ branches/release/libs/functional/hash/test/hash_sequence_test.hpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -38,16 +38,16 @@
containers[10].push_back(-1);
containers[10].push_back(1);
- HASH_NAMESPACE::hash<T> hasher;
+ BOOST_HASH_TEST_NAMESPACE::hash<T> hasher;
for(int i2 = 0; i2 < number_of_containers; ++i2) {
BOOST_TEST(hasher(containers[i2]) == hasher(containers[i2]));
BOOST_TEST(hasher(containers[i2]) ==
- HASH_NAMESPACE::hash_value(containers[i2]));
+ BOOST_HASH_TEST_NAMESPACE::hash_value(containers[i2]));
BOOST_TEST(hasher(containers[i2])
- == HASH_NAMESPACE::hash_range(
+ == BOOST_HASH_TEST_NAMESPACE::hash_range(
containers[i2].begin(), containers[i2].end()));
for(int j2 = i2 + 1; j2 < number_of_containers; ++j2) {
Modified: branches/release/libs/functional/hash/test/hash_set_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_set_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_set_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,8 +5,8 @@
#include "./config.hpp"
-#ifdef TEST_EXTENSIONS
-# ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_EXTENSIONS
+# ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
# else
# include <boost/functional/hash.hpp>
@@ -15,7 +15,7 @@
#include <boost/detail/lightweight_test.hpp>
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
#include <set>
@@ -31,7 +31,7 @@
int main()
{
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
set_tests::set_hash_integer_tests();
multiset_tests::multiset_hash_integer_tests();
#endif
Modified: branches/release/libs/functional/hash/test/hash_set_test.hpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_set_test.hpp (original)
+++ branches/release/libs/functional/hash/test/hash_set_test.hpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -41,16 +41,16 @@
containers[11].insert(4);
containers[11].insert(5);
- HASH_NAMESPACE::hash<T> hasher;
+ BOOST_HASH_TEST_NAMESPACE::hash<T> hasher;
for(int i2 = 0; i2 < number_of_containers; ++i2) {
BOOST_TEST(hasher(containers[i2]) == hasher(containers[i2]));
BOOST_TEST(hasher(containers[i2]) ==
- HASH_NAMESPACE::hash_value(containers[i2]));
+ BOOST_HASH_TEST_NAMESPACE::hash_value(containers[i2]));
BOOST_TEST(hasher(containers[i2])
- == HASH_NAMESPACE::hash_range(
+ == BOOST_HASH_TEST_NAMESPACE::hash_range(
containers[i2].begin(), containers[i2].end()));
for(int j2 = i2 + 1; j2 < number_of_containers; ++j2) {
Modified: branches/release/libs/functional/hash/test/hash_std_array_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_std_array_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_std_array_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,8 +5,8 @@
#include "./config.hpp"
-#ifdef TEST_EXTENSIONS
-# ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_EXTENSIONS
+# ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
# else
# include <boost/functional/hash.hpp>
@@ -16,7 +16,7 @@
#include <boost/config.hpp>
#include <boost/detail/lightweight_test.hpp>
-#if defined(TEST_EXTENSIONS) && !defined(BOOST_NO_CXX11_HDR_ARRAY)
+#if defined(BOOST_HASH_TEST_EXTENSIONS) && !defined(BOOST_NO_CXX11_HDR_ARRAY)
#define TEST_ARRAY
#include <array>
#include <vector>
Modified: branches/release/libs/functional/hash/test/hash_std_smart_ptr_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_std_smart_ptr_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_std_smart_ptr_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,7 +5,7 @@
#include "./config.hpp"
-#ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
#else
# include <boost/functional/hash.hpp>
@@ -14,7 +14,7 @@
#include <boost/detail/lightweight_test.hpp>
#include "./compile_time.hpp"
-#if defined(TEST_EXTENSIONS) && !defined(BOOST_NO_CXX11_SMART_PTR)
+#if defined(BOOST_HASH_TEST_EXTENSIONS) && !defined(BOOST_NO_CXX11_SMART_PTR)
#define TEST_SMART_PTRS
#include <memory>
#endif
@@ -26,8 +26,8 @@
std::shared_ptr<int> x;
compile_time_tests(&x);
- HASH_NAMESPACE::hash<std::shared_ptr<int> > x1;
- HASH_NAMESPACE::hash<std::shared_ptr<int> > x2;
+ BOOST_HASH_TEST_NAMESPACE::hash<std::shared_ptr<int> > x1;
+ BOOST_HASH_TEST_NAMESPACE::hash<std::shared_ptr<int> > x2;
std::shared_ptr<int> ptr1(new int(10));
std::shared_ptr<int> ptr2;
@@ -39,9 +39,9 @@
BOOST_TEST(x1(ptr1) != x2(ptr2));
ptr2 = ptr1;
BOOST_TEST(x1(ptr1) == x2(ptr2));
-#if defined(TEST_EXTENSIONS)
- BOOST_TEST(x1(x) == HASH_NAMESPACE::hash_value(x));
- BOOST_TEST(x1(ptr1) == HASH_NAMESPACE::hash_value(ptr2));
+#if defined(BOOST_HASH_TEST_EXTENSIONS)
+ BOOST_TEST(x1(x) == BOOST_HASH_TEST_NAMESPACE::hash_value(x));
+ BOOST_TEST(x1(ptr1) == BOOST_HASH_TEST_NAMESPACE::hash_value(ptr2));
#endif
}
@@ -50,8 +50,8 @@
std::unique_ptr<int> x;
compile_time_tests(&x);
- HASH_NAMESPACE::hash<std::unique_ptr<int> > x1;
- HASH_NAMESPACE::hash<std::unique_ptr<int> > x2;
+ BOOST_HASH_TEST_NAMESPACE::hash<std::unique_ptr<int> > x1;
+ BOOST_HASH_TEST_NAMESPACE::hash<std::unique_ptr<int> > x2;
std::unique_ptr<int> ptr1(new int(10));
std::unique_ptr<int> ptr2;
@@ -62,8 +62,8 @@
BOOST_TEST(x1(ptr1) == x2(ptr1));
BOOST_TEST(x1(ptr1) != x2(ptr2));
-#if defined(TEST_EXTENSIONS)
- BOOST_TEST(x1(x) == HASH_NAMESPACE::hash_value(x));
+#if defined(BOOST_HASH_TEST_EXTENSIONS)
+ BOOST_TEST(x1(x) == BOOST_HASH_TEST_NAMESPACE::hash_value(x));
#endif
}
Modified: branches/release/libs/functional/hash/test/hash_std_tuple_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_std_tuple_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_std_tuple_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,8 +5,8 @@
#include "./config.hpp"
-#ifdef TEST_EXTENSIONS
-# ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_EXTENSIONS
+# ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
# else
# include <boost/functional/hash.hpp>
@@ -16,7 +16,7 @@
#include <boost/config.hpp>
#include <boost/detail/lightweight_test.hpp>
-#if defined(TEST_EXTENSIONS) && !defined(BOOST_NO_CXX11_HDR_TUPLE)
+#if defined(BOOST_HASH_TEST_EXTENSIONS) && !defined(BOOST_NO_CXX11_HDR_TUPLE)
#define TEST_TUPLE
#include <tuple>
#include <vector>
Modified: branches/release/libs/functional/hash/test/hash_string_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_string_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_string_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,7 +5,7 @@
#include "./config.hpp"
-#ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
#else
# include <boost/functional/hash.hpp>
@@ -19,22 +19,22 @@
{
compile_time_tests((std::string*) 0);
- HASH_NAMESPACE::hash<std::string> x1;
- HASH_NAMESPACE::hash<std::string> x2;
+ BOOST_HASH_TEST_NAMESPACE::hash<std::string> x1;
+ BOOST_HASH_TEST_NAMESPACE::hash<std::string> x2;
BOOST_TEST(x1("Hello") == x2(std::string("Hel") + "lo"));
BOOST_TEST(x1("") == x2(std::string()));
-#if defined(TEST_EXTENSIONS)
+#if defined(BOOST_HASH_TEST_EXTENSIONS)
std::string value1;
std::string value2("Hello");
- BOOST_TEST(x1(value1) == HASH_NAMESPACE::hash_value(value1));
- BOOST_TEST(x1(value2) == HASH_NAMESPACE::hash_value(value2));
- BOOST_TEST(HASH_NAMESPACE::hash_value(value1) ==
- HASH_NAMESPACE::hash_range(value1.begin(), value1.end()));
- BOOST_TEST(HASH_NAMESPACE::hash_value(value2) ==
- HASH_NAMESPACE::hash_range(value2.begin(), value2.end()));
+ BOOST_TEST(x1(value1) == BOOST_HASH_TEST_NAMESPACE::hash_value(value1));
+ BOOST_TEST(x1(value2) == BOOST_HASH_TEST_NAMESPACE::hash_value(value2));
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_value(value1) ==
+ BOOST_HASH_TEST_NAMESPACE::hash_range(value1.begin(), value1.end()));
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_value(value2) ==
+ BOOST_HASH_TEST_NAMESPACE::hash_range(value2.begin(), value2.end()));
#endif
}
@@ -43,22 +43,22 @@
{
compile_time_tests((std::wstring*) 0);
- HASH_NAMESPACE::hash<std::wstring> x1;
- HASH_NAMESPACE::hash<std::wstring> x2;
+ BOOST_HASH_TEST_NAMESPACE::hash<std::wstring> x1;
+ BOOST_HASH_TEST_NAMESPACE::hash<std::wstring> x2;
BOOST_TEST(x1(L"Hello") == x2(std::wstring(L"Hel") + L"lo"));
BOOST_TEST(x1(L"") == x2(std::wstring()));
-#if defined(TEST_EXTENSIONS)
+#if defined(BOOST_HASH_TEST_EXTENSIONS)
std::wstring value1;
std::wstring value2(L"Hello");
- BOOST_TEST(x1(value1) == HASH_NAMESPACE::hash_value(value1));
- BOOST_TEST(x1(value2) == HASH_NAMESPACE::hash_value(value2));
- BOOST_TEST(HASH_NAMESPACE::hash_value(value1) ==
- HASH_NAMESPACE::hash_range(value1.begin(), value1.end()));
- BOOST_TEST(HASH_NAMESPACE::hash_value(value2) ==
- HASH_NAMESPACE::hash_range(value2.begin(), value2.end()));
+ BOOST_TEST(x1(value1) == BOOST_HASH_TEST_NAMESPACE::hash_value(value1));
+ BOOST_TEST(x1(value2) == BOOST_HASH_TEST_NAMESPACE::hash_value(value2));
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_value(value1) ==
+ BOOST_HASH_TEST_NAMESPACE::hash_range(value1.begin(), value1.end()));
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_value(value2) ==
+ BOOST_HASH_TEST_NAMESPACE::hash_range(value2.begin(), value2.end()));
#endif
}
#endif
Modified: branches/release/libs/functional/hash/test/hash_type_index_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_type_index_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_type_index_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,7 +5,7 @@
#include "./config.hpp"
-#ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
#else
# include <boost/functional/hash.hpp>
@@ -18,7 +18,7 @@
#include <typeindex>
void test_type_index() {
- HASH_NAMESPACE::hash<std::type_index> hasher;
+ BOOST_HASH_TEST_NAMESPACE::hash<std::type_index> hasher;
#if defined(BOOST_NO_TYPEID)
std::cout<<"Unable to test std::type_index, as typeid isn't available"
@@ -31,9 +31,9 @@
BOOST_TEST(hasher(int_index) == int_index.hash_code());
BOOST_TEST(hasher(int_index) == int2_index.hash_code());
BOOST_TEST(hasher(char_index) == char_index.hash_code());
- BOOST_TEST(HASH_NAMESPACE::hash_value(int_index) == int_index.hash_code());
- BOOST_TEST(HASH_NAMESPACE::hash_value(int_index) == int2_index.hash_code());
- BOOST_TEST(HASH_NAMESPACE::hash_value(char_index) == char_index.hash_code());
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_value(int_index) == int_index.hash_code());
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_value(int_index) == int2_index.hash_code());
+ BOOST_TEST(BOOST_HASH_TEST_NAMESPACE::hash_value(char_index) == char_index.hash_code());
BOOST_TEST(hasher(int_index) == hasher(int2_index));
BOOST_TEST(hasher(int_index) != hasher(char_index));
Modified: branches/release/libs/functional/hash/test/hash_value_array_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_value_array_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_value_array_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -8,8 +8,8 @@
#include "./config.hpp"
-#ifdef TEST_EXTENSIONS
-# ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_EXTENSIONS
+# ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
# else
# include <boost/functional/hash.hpp>
@@ -18,7 +18,7 @@
#include <boost/detail/lightweight_test.hpp>
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
void array_int_test()
{
@@ -29,32 +29,32 @@
8, -12, 23, 65, 45,
-1, 93, -54, 987, 3
};
- HASH_NAMESPACE::hash<int[25]> hasher1;
+ BOOST_HASH_TEST_NAMESPACE::hash<int[25]> hasher1;
int array2[1] = {3};
- HASH_NAMESPACE::hash<int[1]> hasher2;
+ BOOST_HASH_TEST_NAMESPACE::hash<int[1]> hasher2;
int array3[2] = {2, 3};
- HASH_NAMESPACE::hash<int[2]> hasher3;
+ BOOST_HASH_TEST_NAMESPACE::hash<int[2]> hasher3;
- BOOST_TEST(hasher1(array1) == HASH_NAMESPACE::hash_value(array1));
- BOOST_TEST(hasher2(array2) == HASH_NAMESPACE::hash_value(array2));
- BOOST_TEST(hasher3(array3) == HASH_NAMESPACE::hash_value(array3));
+ BOOST_TEST(hasher1(array1) == BOOST_HASH_TEST_NAMESPACE::hash_value(array1));
+ BOOST_TEST(hasher2(array2) == BOOST_HASH_TEST_NAMESPACE::hash_value(array2));
+ BOOST_TEST(hasher3(array3) == BOOST_HASH_TEST_NAMESPACE::hash_value(array3));
}
void two_dimensional_array_test()
{
int array[3][2] = {{-5, 6}, {7, -3}, {26, 1}};
- HASH_NAMESPACE::hash<int[3][2]> hasher;
+ BOOST_HASH_TEST_NAMESPACE::hash<int[3][2]> hasher;
- BOOST_TEST(hasher(array) == HASH_NAMESPACE::hash_value(array));
+ BOOST_TEST(hasher(array) == BOOST_HASH_TEST_NAMESPACE::hash_value(array));
}
#endif
int main()
{
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
array_int_test();
two_dimensional_array_test();
#endif
Modified: branches/release/libs/functional/hash/test/hash_vector_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/hash_vector_test.cpp (original)
+++ branches/release/libs/functional/hash/test/hash_vector_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,8 +5,8 @@
#include "./config.hpp"
-#ifdef TEST_EXTENSIONS
-# ifdef TEST_STD_INCLUDES
+#ifdef BOOST_HASH_TEST_EXTENSIONS
+# ifdef BOOST_HASH_TEST_STD_INCLUDES
# include <functional>
# else
# include <boost/functional/hash.hpp>
@@ -15,7 +15,7 @@
#include <boost/detail/lightweight_test.hpp>
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
#include <vector>
@@ -23,11 +23,11 @@
#define CONTAINER_TYPE vector
#include "./hash_sequence_test.hpp"
-#endif // TEST_EXTENSIONS
+#endif // BOOST_HASH_TEST_EXTENSIONS
int main()
{
-#ifdef TEST_EXTENSIONS
+#ifdef BOOST_HASH_TEST_EXTENSIONS
vector_tests::vector_hash_integer_tests();
#endif
Modified: branches/release/libs/functional/hash/test/link_ext_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/link_ext_test.cpp (original)
+++ branches/release/libs/functional/hash/test/link_ext_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,24 +5,24 @@
#include "./config.hpp"
-#define HASH_NAMESPACE boost
+#define BOOST_HASH_TEST_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;
+ // Check that BOOST_HASH_TEST_NAMESPACE::hash<int*> works in both files.
+ BOOST_HASH_TEST_NAMESPACE::hash<int*> ptr_hasher;
BOOST_TEST(hash1 == ptr_hasher(x1));
-#if defined(TEST_EXTENSIONS)
+#if defined(BOOST_HASH_TEST_EXTENSIONS)
// Check that std::vector<std::size_t> is avaiable in this file.
std::vector<std::size_t> x;
x.push_back(*x1);
- HASH_NAMESPACE::hash<std::vector<std::size_t> > vector_hasher;
- return vector_hasher(x) != HASH_NAMESPACE::hash_value(x);
+ BOOST_HASH_TEST_NAMESPACE::hash<std::vector<std::size_t> > vector_hasher;
+ return vector_hasher(x) != BOOST_HASH_TEST_NAMESPACE::hash_value(x);
#else
Modified: branches/release/libs/functional/hash/test/link_no_ext_test.cpp
==============================================================================
--- branches/release/libs/functional/hash/test/link_no_ext_test.cpp (original)
+++ branches/release/libs/functional/hash/test/link_no_ext_test.cpp 2012-12-20 15:38:09 EST (Thu, 20 Dec 2012)
@@ -5,7 +5,7 @@
#include "./config.hpp"
-#define HASH_NAMESPACE boost
+#define BOOST_HASH_TEST_NAMESPACE boost
#define BOOST_HASH_NO_EXTENSIONS
#include <boost/functional/hash.hpp>
#include <boost/detail/lightweight_test.hpp>
@@ -13,7 +13,7 @@
extern int f(std::size_t, int*);
int main() {
- HASH_NAMESPACE::hash<int*> ptr_hasher;
+ BOOST_HASH_TEST_NAMESPACE::hash<int*> ptr_hasher;
int x = 55;
BOOST_TEST(!f(ptr_hasher(&x), &x));
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