diff options
author | Roger Ferrer Ibanez <roger.ferreribanez@arm.com> | 2016-11-24 11:28:02 +0000 |
---|---|---|
committer | Roger Ferrer Ibanez <roger.ferreribanez@arm.com> | 2016-11-24 11:28:02 +0000 |
commit | d056b5be51bbbcaa4b38b6468c4946125178ddba (patch) | |
tree | 1f8226832a2f12fe4c412ceb79d8e7acdcb1b1da /libcxx/test/std/strings/basic.string/string.ops | |
parent | 11b63cd309630808d92c84dd93d14aeaec7fc2fe (diff) | |
download | bcm5719-llvm-d056b5be51bbbcaa4b38b6468c4946125178ddba.tar.gz bcm5719-llvm-d056b5be51bbbcaa4b38b6468c4946125178ddba.zip |
Reverting wrong diff
I managed to confuse me with two reviews of the same thing and ended commiting the wrong one.
llvm-svn: 287868
Diffstat (limited to 'libcxx/test/std/strings/basic.string/string.ops')
-rw-r--r-- | libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp index 970f9e4bcd1..145e8dde58b 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp @@ -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() |