summaryrefslogtreecommitdiffstats
path: root/libcxx
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/test/libcxx/debug/containers/db_string.pass.cpp3
-rw-r--r--libcxx/test/support/debug_mode_helper.h10
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) );
}
OpenPOWER on IntegriCloud