From 3882a610659a703a1bb40de9f20d50f550f7ead3 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 21 Nov 2009 19:40:28 +0000 Subject: [PATCH] Inspect fixes. [SVN r57838] --- test/exception/assign_exception_tests.cpp | 6 ++++-- test/exception/erase_exception_tests.cpp | 2 +- test/exception/insert_exception_tests.cpp | 6 +++--- test/exception/rehash_exception_tests.cpp | 4 +++- test/exception/swap_exception_tests.cpp | 4 ++-- test/helpers/exception_test.hpp | 2 +- test/unordered/incomplete_test.cpp | 2 +- 7 files changed, 15 insertions(+), 11 deletions(-) diff --git a/test/exception/assign_exception_tests.cpp b/test/exception/assign_exception_tests.cpp index f059e0f7..a6c92945 100644 --- a/test/exception/assign_exception_tests.cpp +++ b/test/exception/assign_exception_tests.cpp @@ -22,7 +22,8 @@ struct self_assign_base : public test::exception_base typedef T data_type; T init() const { return T(values.begin(), values.end()); } void run(T& x) const { x = x; } - void check(T const& x) const { test::check_equivalent_keys(x); } + void check BOOST_PREVENT_MACRO_SUBSTITUTION(T const& x) const + { test::check_equivalent_keys(x); } }; template @@ -52,7 +53,8 @@ struct assign_base : public test::exception_base typedef T data_type; T init() const { return T(x); } void run(T& x1) const { x1 = y; } - void check(T const& x1) const { test::check_equivalent_keys(x1); } + void check BOOST_PREVENT_MACRO_SUBSTITUTION(T const& x1) const + { test::check_equivalent_keys(x1); } }; template diff --git a/test/exception/erase_exception_tests.cpp b/test/exception/erase_exception_tests.cpp index 6746d628..4c944a1d 100644 --- a/test/exception/erase_exception_tests.cpp +++ b/test/exception/erase_exception_tests.cpp @@ -22,7 +22,7 @@ struct erase_test_base : public test::exception_base return T(values.begin(), values.end()); } - void check(T const& x) const { + void check BOOST_PREVENT_MACRO_SUBSTITUTION(T const& x) const { std::string scope(test::scope); BOOST_TEST(scope.find("hash::") != std::string::npos || diff --git a/test/exception/insert_exception_tests.cpp b/test/exception/insert_exception_tests.cpp index cf7d04e0..5dc7611b 100644 --- a/test/exception/insert_exception_tests.cpp +++ b/test/exception/insert_exception_tests.cpp @@ -27,7 +27,7 @@ struct insert_test_base : public test::exception_base return T(); } - void check(T const& x, strong_type const& strong) const { + void check BOOST_PREVENT_MACRO_SUBSTITUTION(T const& x, strong_type const& strong) const { std::string scope(test::scope); if(scope.find("hash::operator()") == std::string::npos) @@ -92,7 +92,7 @@ struct insert_test3 : public insert_test_base x.insert(this->values.begin(), this->values.end()); } - void check(T const& x) const { + void check BOOST_PREVENT_MACRO_SUBSTITUTION(T const& x) const { test::check_equivalent_keys(x); } }; @@ -215,7 +215,7 @@ struct insert_test_rehash3 : public insert_test_base BOOST_TEST(x.bucket_count() != bucket_count); } - void check(T const& x) const { + void check BOOST_PREVENT_MACRO_SUBSTITUTION(T const& x) const { if(x.size() < rehash_bucket_count) { //BOOST_TEST(x.bucket_count() == original_bucket_count); } diff --git a/test/exception/rehash_exception_tests.cpp b/test/exception/rehash_exception_tests.cpp index 7e69e748..8a6c6d22 100644 --- a/test/exception/rehash_exception_tests.cpp +++ b/test/exception/rehash_exception_tests.cpp @@ -28,7 +28,9 @@ struct rehash_test_base : public test::exception_base return x; } - void check(T const& x, strong_type const& strong) const { + void check BOOST_PREVENT_MACRO_SUBSTITUTION(T const& x, + strong_type const& strong) const + { std::string scope(test::scope); if(scope.find("hash::operator()") == std::string::npos && diff --git a/test/exception/swap_exception_tests.cpp b/test/exception/swap_exception_tests.cpp index e884cb11..ed370e2d 100644 --- a/test/exception/swap_exception_tests.cpp +++ b/test/exception/swap_exception_tests.cpp @@ -22,7 +22,7 @@ struct self_swap_base : public test::exception_base typedef T data_type; T init() const { return T(values.begin(), values.end()); } void run(T& x) const { x.swap(x); } - void check(T const& x) const { + void check BOOST_PREVENT_MACRO_SUBSTITUTION(T const& x) const { std::string scope(test::scope); #if BOOST_UNORDERED_SWAP_METHOD != 2 @@ -77,7 +77,7 @@ struct swap_base : public test::exception_base d.x.swap(d.y); } catch (std::runtime_error) {} } - void check(data_type const& d) const { + void check BOOST_PREVENT_MACRO_SUBSTITUTION(data_type const& d) const { std::string scope(test::scope); #if BOOST_UNORDERED_SWAP_METHOD != 2 diff --git a/test/helpers/exception_test.hpp b/test/helpers/exception_test.hpp index e64d168c..a66c30aa 100644 --- a/test/helpers/exception_test.hpp +++ b/test/helpers/exception_test.hpp @@ -110,7 +110,7 @@ namespace test { template void test(T const&) const {} }; data_type init() const { return data_type(); } - void check() const {} + void check BOOST_PREVENT_MACRO_SUBSTITUTION() const {} }; template diff --git a/test/unordered/incomplete_test.cpp b/test/unordered/incomplete_test.cpp index 01f4c530..7bfaf7bc 100644 --- a/test/unordered/incomplete_test.cpp +++ b/test/unordered/incomplete_test.cpp @@ -36,4 +36,4 @@ int main() { m2.insert(std::make_pair(test::value(), test::value())); s1.insert(test::value()); s2.insert(test::value()); -} \ No newline at end of file +}