[libcxx] r292342 - Get more std::string _LIBCPP_DEBUG tests passing
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 17 21:34:43 PST 2017
Author: ericwf
Date: Tue Jan 17 23:34:42 2017
New Revision: 292342
URL: http://llvm.org/viewvc/llvm-project?rev=292342&view=rev
Log:
Get more std::string _LIBCPP_DEBUG tests passing
Modified:
libcxx/trunk/test/libcxx/debug/containers/db_string.pass.cpp
libcxx/trunk/test/support/debug_mode_helper.h
Modified: libcxx/trunk/test/libcxx/debug/containers/db_string.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/debug/containers/db_string.pass.cpp?rev=292342&r1=292341&r2=292342&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/debug/containers/db_string.pass.cpp (original)
+++ libcxx/trunk/test/libcxx/debug/containers/db_string.pass.cpp Tue Jan 17 23:34:42 2017
@@ -38,8 +38,7 @@ struct StringContainerChecks : BasicCont
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);
Modified: libcxx/trunk/test/support/debug_mode_helper.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/debug_mode_helper.h?rev=292342&r1=292341&r2=292342&view=diff
==============================================================================
--- libcxx/trunk/test/support/debug_mode_helper.h (original)
+++ libcxx/trunk/test/support/debug_mode_helper.h Tue Jan 17 23:34:42 2017
@@ -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) );
}
More information about the cfe-commits
mailing list