From 5be71a0e904e16b2143f1cfe6ec821fef05bd03e Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 29 Jul 2012 07:18:35 +0000 Subject: [PATCH] Unordered: Output stages in at_tests. Getting a memory deallocation error from Sandia's linux c++11 clang. Add some trace output to see if it gives a clue where it's going wrong. [SVN r79793] --- test/unordered/at_tests.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/unordered/at_tests.cpp b/test/unordered/at_tests.cpp index 111f9c2f..cd272679 100644 --- a/test/unordered/at_tests.cpp +++ b/test/unordered/at_tests.cpp @@ -13,21 +13,31 @@ namespace at_tests { UNORDERED_AUTO_TEST(at_tests) { + BOOST_LIGHTWEIGHT_TEST_OSTREAM << "Create Map" << std::endl; + boost::unordered_map x; typedef boost::unordered_map::iterator iterator; + BOOST_LIGHTWEIGHT_TEST_OSTREAM << "Add elements" << std::endl; + x["one"] = 1; x["two"] = 2; + BOOST_LIGHTWEIGHT_TEST_OSTREAM << "Check existing elements" << std::endl; + BOOST_TEST(x.at("one") == 1); BOOST_TEST(x.at("two") == 2); + BOOST_LIGHTWEIGHT_TEST_OSTREAM << "Check missing element" << std::endl; + try { x.at("three"); BOOST_ERROR("Should have thrown."); } catch(std::out_of_range) { } + + BOOST_LIGHTWEIGHT_TEST_OSTREAM << "Finished" << std::endl; } }