diff --git a/hash/test/config.hpp b/hash/test/config.hpp index 1fd0f5f..893f456 100644 --- a/hash/test/config.hpp +++ b/hash/test/config.hpp @@ -12,3 +12,9 @@ # define TEST_EXTENSIONS # endif #endif + +#if defined(_WIN32_WCE) +// The standard windows mobile headers trigger this warning so I disable it +// before doing anything else. +#pragma warning(disable:4201) // nonstandard extension used : nameless struct/union +#endif diff --git a/hash/test/container_fwd_test.cpp b/hash/test/container_fwd_test.cpp index 87f5b90..a63c086 100644 --- a/hash/test/container_fwd_test.cpp +++ b/hash/test/container_fwd_test.cpp @@ -3,6 +3,8 @@ // 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) +#include "./config.hpp" + #include #if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) diff --git a/hash/test/extensions_hpp_test.cpp b/hash/test/extensions_hpp_test.cpp index 182ec01..c27981a 100644 --- a/hash/test/extensions_hpp_test.cpp +++ b/hash/test/extensions_hpp_test.cpp @@ -8,6 +8,8 @@ // It probably should be in boost/functional/hash/detail, but since it isn't it // should work. +#include "./config.hpp" + #include int main() { diff --git a/hash/test/hash_custom_test.cpp b/hash/test/hash_custom_test.cpp index 9943d0c..fb37d91 100644 --- a/hash/test/hash_custom_test.cpp +++ b/hash/test/hash_custom_test.cpp @@ -3,6 +3,7 @@ // 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) +#include "./config.hpp" #include #include diff --git a/hash/test/hash_friend_test.cpp b/hash/test/hash_friend_test.cpp index cac4c7f..8a493e2 100644 --- a/hash/test/hash_friend_test.cpp +++ b/hash/test/hash_friend_test.cpp @@ -3,6 +3,8 @@ // 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) +#include "./config.hpp" + #include #include diff --git a/hash/test/hash_fwd_test_1.cpp b/hash/test/hash_fwd_test_1.cpp index e9a1cd8..6c7f8d3 100644 --- a/hash/test/hash_fwd_test_1.cpp +++ b/hash/test/hash_fwd_test_1.cpp @@ -5,6 +5,8 @@ // This checks that template code implemented using hash_fwd will work. +#include "./config.hpp" + #include "./hash_fwd_test.hpp" #include diff --git a/hash/test/hash_fwd_test_2.cpp b/hash/test/hash_fwd_test_2.cpp index cf6e163..869f67b 100644 --- a/hash/test/hash_fwd_test_2.cpp +++ b/hash/test/hash_fwd_test_2.cpp @@ -6,6 +6,8 @@ // This test just makes sure a header which uses hash_fwd can compile without // the main hash headers. +#include "./config.hpp" + #if !defined(TEST_EXTENSIONS) || defined(TEST_STD_INCLUDES) int main() {} diff --git a/hash/test/hash_global_namespace_test.cpp b/hash/test/hash_global_namespace_test.cpp index a45278c..ccb99e7 100644 --- a/hash/test/hash_global_namespace_test.cpp +++ b/hash/test/hash_global_namespace_test.cpp @@ -6,6 +6,8 @@ // This test demonstrates an ADL bug in Borland 5.5 where ADL isn't performed // in the global namespace. +#include "./config.hpp" + #include #include diff --git a/hash/test/hash_no_ext_fail_test.cpp b/hash/test/hash_no_ext_fail_test.cpp index a29f8d5..22f6f5a 100644 --- a/hash/test/hash_no_ext_fail_test.cpp +++ b/hash/test/hash_no_ext_fail_test.cpp @@ -3,14 +3,19 @@ // 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) -#define HASH_NAMESPACE boost +#include "./config.hpp" // Simple test to make sure BOOST_HASH_NO_EXTENSIONS does disable extensions // (or at least one of them). -#define BOOST_HASH_NO_EXTENSIONS +#if !defined(BOOST_HASH_NO_EXTENSIONS) +# define BOOST_HASH_NO_EXTENSIONS +#endif -#include -#include +#ifdef TEST_STD_INCLUDES +# include +#else +# include +#endif template void ignore(T const&) {} @@ -18,5 +23,6 @@ int main() { HASH_NAMESPACE::hash< int[10] > hasher; ignore(hasher); + return 0; } diff --git a/hash/test/hash_no_ext_macro_1.cpp b/hash/test/hash_no_ext_macro_1.cpp index 1d238c0..ea727bb 100644 --- a/hash/test/hash_no_ext_macro_1.cpp +++ b/hash/test/hash_no_ext_macro_1.cpp @@ -3,24 +3,27 @@ // 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) -#define HASH_NAMESPACE boost +#include "./config.hpp" + +#if defined(TEST_EXTENSIONS) // Include header without BOOST_HASH_NO_EXTENSIONS defined -#if defined(BOOST_HASH_NO_EXTENSIONS) -#undef BOOST_HASH_NO_EXTENSIONS -#endif -#include +# if defined(BOOST_HASH_NO_EXTENSIONS) +# undef BOOST_HASH_NO_EXTENSIONS +# endif +# include // Include header with BOOST_HASH_NO_EXTENSIONS defined -#define BOOST_HASH_NO_EXTENSIONS -#include +# define BOOST_HASH_NO_EXTENSIONS +# include +#endif #include #include -#include int main() { +#if defined(TEST_EXTENSIONS) std::deque x; x.push_back(1); @@ -28,6 +31,7 @@ int main() HASH_NAMESPACE::hash > hasher; BOOST_TEST(hasher(x) == HASH_NAMESPACE::hash_value(x)); +#endif return boost::report_errors(); } diff --git a/hash/test/hash_no_ext_macro_2.cpp b/hash/test/hash_no_ext_macro_2.cpp index 6ab083e..a8d8c65 100644 --- a/hash/test/hash_no_ext_macro_2.cpp +++ b/hash/test/hash_no_ext_macro_2.cpp @@ -3,23 +3,27 @@ // 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) -#define HASH_NAMESPACE boost +#include "./config.hpp" + +#if defined(TEST_EXTENSIONS) // Include header with BOOST_HASH_NO_EXTENSIONS defined -#if !defined(BOOST_HASH_NO_EXTENSIONS) -#define BOOST_HASH_NO_EXTENSIONS -#endif -#include +# if !defined(BOOST_HASH_NO_EXTENSIONS) +# define BOOST_HASH_NO_EXTENSIONS +# endif +# include // Include header without BOOST_HASH_NO_EXTENSIONS defined -#undef BOOST_HASH_NO_EXTENSIONS -#include +# undef BOOST_HASH_NO_EXTENSIONS +# include +#endif #include #include int main() { +#if defined(TEST_EXTENSIONS) std::map x; x.insert(std::map::value_type(53, -42)); @@ -27,6 +31,7 @@ int main() HASH_NAMESPACE::hash > hasher; BOOST_TEST(hasher(x) == HASH_NAMESPACE::hash_value(x)); +#endif return boost::report_errors(); } diff --git a/hash/test/link_ext_test.cpp b/hash/test/link_ext_test.cpp index d334035..c0e224c 100644 --- a/hash/test/link_ext_test.cpp +++ b/hash/test/link_ext_test.cpp @@ -3,6 +3,8 @@ // 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) +#include "./config.hpp" + #define HASH_NAMESPACE boost #include #include diff --git a/hash/test/link_no_ext_test.cpp b/hash/test/link_no_ext_test.cpp index 7f46984..c2e6869 100644 --- a/hash/test/link_no_ext_test.cpp +++ b/hash/test/link_no_ext_test.cpp @@ -3,6 +3,8 @@ // 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) +#include "./config.hpp" + #define HASH_NAMESPACE boost #define BOOST_HASH_NO_EXTENSIONS #include diff --git a/hash/test/link_test.cpp b/hash/test/link_test.cpp index 37f9ee1..bdae262 100644 --- a/hash/test/link_test.cpp +++ b/hash/test/link_test.cpp @@ -3,6 +3,8 @@ // 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) +#include "./config.hpp" + #include extern int f(); diff --git a/hash/test/link_test_2.cpp b/hash/test/link_test_2.cpp index f32065c..1beffc8 100644 --- a/hash/test/link_test_2.cpp +++ b/hash/test/link_test_2.cpp @@ -3,6 +3,8 @@ // 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) +#include "./config.hpp" + #include int f() { return 0; } diff --git a/hash/test/namespace_fail_test.cpp b/hash/test/namespace_fail_test.cpp index 711ddd0..1db9fc6 100644 --- a/hash/test/namespace_fail_test.cpp +++ b/hash/test/namespace_fail_test.cpp @@ -6,6 +6,8 @@ // Check that I haven't inadvertantly pulled namespace std into the global // namespace. +#include "./config.hpp" + #include #include