[libcxx] r287868 - Reverting wrong diff

Roger Ferrer Ibanez via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 24 03:28:03 PST 2016


Author: rogfer01
Date: Thu Nov 24 05:28:02 2016
New Revision: 287868

URL: http://llvm.org/viewvc/llvm-project?rev=287868&view=rev
Log:
Reverting wrong diff

I managed to confuse me with two reviews of the same thing and ended commiting the wrong one.


Modified:
    libcxx/trunk/test/std/strings/basic.string/string.capacity/capacity.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp

Modified: libcxx/trunk/test/std/strings/basic.string/string.capacity/capacity.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.capacity/capacity.pass.cpp?rev=287868&r1=287867&r2=287868&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.capacity/capacity.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.capacity/capacity.pass.cpp Thu Nov 24 05:28:02 2016
@@ -7,6 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+// XFAIL: libcpp-no-exceptions
 // <string>
 
 // size_type capacity() const;
@@ -17,27 +18,21 @@
 #include "test_allocator.h"
 #include "min_allocator.h"
 
-#include "test_macros.h"
-
 template <class S>
 void
 test(S s)
 {
     S::allocator_type::throw_after = 0;
-#ifndef TEST_HAS_NO_EXCEPTIONS
     try
-#endif
     {
         while (s.size() < s.capacity())
             s.push_back(typename S::value_type());
         assert(s.size() == s.capacity());
     }
-#ifndef TEST_HAS_NO_EXCEPTIONS
     catch (...)
     {
         assert(false);
     }
-#endif
     S::allocator_type::throw_after = INT_MAX;
 }
 

Modified: libcxx/trunk/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp?rev=287868&r1=287867&r2=287868&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp Thu Nov 24 05:28:02 2016
@@ -7,6 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+// XFAIL: libcpp-no-exceptions
 // <string>
 
 // basic_string substr(size_type pos = 0, size_type n = npos) const;
@@ -23,27 +24,19 @@ template <class S>
 void
 test(const S& s, typename S::size_type pos, typename S::size_type n)
 {
-#ifndef TEST_HAS_NO_EXCEPTIONS
     try
-#else
-    if (pos <= s.size())
-#endif
     {
         S str = s.substr(pos, n);
         LIBCPP_ASSERT(str.__invariants());
-#ifndef TEST_HAS_NO_EXCEPTIONS
         assert(pos <= s.size());
-#endif
         typename S::size_type rlen = std::min(n, s.size() - pos);
         assert(str.size() == rlen);
         assert(S::traits_type::compare(s.data()+pos, str.data(), rlen) == 0);
     }
-#ifndef TEST_HAS_NO_EXCEPTIONS
     catch (std::out_of_range&)
     {
         assert(pos > s.size());
     }
-#endif
 }
 
 int main()




More information about the cfe-commits mailing list