diff options
| author | Eric Fiselier <eric@efcs.ca> | 2017-01-18 05:34:42 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2017-01-18 05:34:42 +0000 |
| commit | 673c5f9cea5f0bb34037c7b4e3e4216a58eeb0f9 (patch) | |
| tree | c44f7cb15559e327ee8fe398c1834f4cf41a0a9e /libcxx/test | |
| parent | 4f5f8967eb3c391eaba7e88bc4135adb679ef02b (diff) | |
| download | bcm5719-llvm-673c5f9cea5f0bb34037c7b4e3e4216a58eeb0f9.tar.gz bcm5719-llvm-673c5f9cea5f0bb34037c7b4e3e4216a58eeb0f9.zip | |
Get more std::string _LIBCPP_DEBUG tests passing
llvm-svn: 292342
Diffstat (limited to 'libcxx/test')
| -rw-r--r-- | libcxx/test/libcxx/debug/containers/db_string.pass.cpp | 3 | ||||
| -rw-r--r-- | libcxx/test/support/debug_mode_helper.h | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/libcxx/test/libcxx/debug/containers/db_string.pass.cpp b/libcxx/test/libcxx/debug/containers/db_string.pass.cpp index ee1634140ff..98229ea6267 100644 --- a/libcxx/test/libcxx/debug/containers/db_string.pass.cpp +++ b/libcxx/test/libcxx/debug/containers/db_string.pass.cpp @@ -38,8 +38,7 @@ struct StringContainerChecks : BasicContainerChecks<Container, CT> { public: static void run() { Base::run_iterator_tests(); - // FIXME: get these passing - // Base::run_allocator_aware_tests(); + Base::run_allocator_aware_tests(); try { for (int N : {3, 128}) { FrontOnEmptyContainer(N); diff --git a/libcxx/test/support/debug_mode_helper.h b/libcxx/test/support/debug_mode_helper.h index 0c6170589c2..350deb08382 100644 --- a/libcxx/test/support/debug_mode_helper.h +++ b/libcxx/test/support/debug_mode_helper.h @@ -191,8 +191,9 @@ public: static void run_allocator_aware_tests() { try { SwapNonEqualAllocators(); - if constexpr (CT != CT_ForwardList) { - SwapInvalidatesIterators(); // FIXME: This should work + if constexpr (CT != CT_ForwardList ) { + // FIXME: This should work for both forward_list and string + SwapInvalidatesIterators(); } } catch (...) { assert(false && "uncaught debug exception"); @@ -359,7 +360,10 @@ private: iterator it2 = C2.begin(); swap(C1, C2); CHECK_DEBUG_THROWS( C1.erase(it1) ); - C1.erase(it2); + if (CT == CT_String) { + CHECK_DEBUG_THROWS(C1.erase(it2)); + } else + C1.erase(it2); //C2.erase(it1); CHECK_DEBUG_THROWS( C1.erase(it1) ); } |

