diff options
Diffstat (limited to 'libcxx/test/support')
| -rw-r--r-- | libcxx/test/support/debug_mode_helper.h | 10 |
1 files changed, 7 insertions, 3 deletions
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) ); } |

