From 7342d0afd06bf28167cdaf3f900bc45c1872b699 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Sun, 16 Apr 2017 11:21:51 +0300 Subject: [PATCH] Fix test for GCC -O1, make the test faster --- test/test.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test.cpp b/test/test.cpp index adadaa6..5d45805 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -60,7 +60,9 @@ void test_deeply_nested_namespaces() { #if BOOST_STACKTRACE_SYMNAME BOOST_TEST(ss.str().find("main") != std::string::npos); - BOOST_TEST(ss.str().find("get_backtrace_from_nested_namespaces") != std::string::npos); + BOOST_TEST(ss.str().find("get_backtrace_from_nested_namespaces") != std::string::npos + || ss.str().find("1# return_from_nested_namespaces") != std::string::npos); // GCC with -O1 has strange inlining, so this line is true while the prev one is false. + BOOST_TEST(ss.str().find("return_from_nested_namespaces") != std::string::npos); #endif @@ -298,7 +300,6 @@ int main() { BOOST_TEST(b2.size() == 4); test_comparisons_base(bar1(), bar2()); - test_nested<250>(); test_nested<300>(); BOOST_TEST(boost::stacktrace::stacktrace(0, 1).size() == 1); BOOST_TEST(boost::stacktrace::stacktrace(1, 1).size() == 1);