mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 18:38:30 +08:00
More string fixes for noexcept cases. Apparently I didn't get them all in r258281.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@258291 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
|
// XFAIL: libcpp-no-exceptions
|
||||||
// <iterator>
|
// <iterator>
|
||||||
|
|
||||||
// __libcpp_is_trivial_iterator<Tp>
|
// __libcpp_is_trivial_iterator<Tp>
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ test(S s, It first, It last, S expected)
|
|||||||
assert(s == expected);
|
assert(s == expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef TEST_HAS_NO_EXCEPTIONS
|
||||||
template <class S, class It>
|
template <class S, class It>
|
||||||
void
|
void
|
||||||
test_exceptions(S s, It first, It last)
|
test_exceptions(S s, It first, It last)
|
||||||
@@ -40,6 +41,7 @@ test_exceptions(S s, It first, It last)
|
|||||||
assert(s.__invariants());
|
assert(s.__invariants());
|
||||||
assert(s == aCopy);
|
assert(s == aCopy);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ test(S s, It first, It last, S expected)
|
|||||||
assert(s == expected);
|
assert(s == expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef TEST_HAS_NO_EXCEPTIONS
|
||||||
template <class S, class It>
|
template <class S, class It>
|
||||||
void
|
void
|
||||||
test_exceptions(S s, It first, It last)
|
test_exceptions(S s, It first, It last)
|
||||||
@@ -40,6 +41,7 @@ test_exceptions(S s, It first, It last)
|
|||||||
assert(s.__invariants());
|
assert(s.__invariants());
|
||||||
assert(s == aCopy);
|
assert(s == aCopy);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ test(S s, typename S::difference_type pos, It first, It last, S expected)
|
|||||||
assert(s == expected);
|
assert(s == expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef TEST_HAS_NO_EXCEPTIONS
|
||||||
template <class S, class It>
|
template <class S, class It>
|
||||||
void
|
void
|
||||||
test_exceptions(S s, typename S::difference_type pos, It first, It last)
|
test_exceptions(S s, typename S::difference_type pos, It first, It last)
|
||||||
@@ -47,6 +48,7 @@ test_exceptions(S s, typename S::difference_type pos, It first, It last)
|
|||||||
assert(s.__invariants());
|
assert(s.__invariants());
|
||||||
assert(s == aCopy);
|
assert(s == aCopy);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ test(S s, typename S::size_type pos1, typename S::size_type n1, It f, It l, S ex
|
|||||||
assert(s.size() == old_size - xlen + rlen);
|
assert(s.size() == old_size - xlen + rlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef TEST_HAS_NO_EXCEPTIONS
|
||||||
template <class S, class It>
|
template <class S, class It>
|
||||||
void
|
void
|
||||||
test_exceptions(S s, typename S::size_type pos1, typename S::size_type n1, It f, It l)
|
test_exceptions(S s, typename S::size_type pos1, typename S::size_type n1, It f, It l)
|
||||||
@@ -50,6 +51,7 @@ test_exceptions(S s, typename S::size_type pos1, typename S::size_type n1, It f,
|
|||||||
assert(s.__invariants());
|
assert(s.__invariants());
|
||||||
assert(s == aCopy);
|
assert(s == aCopy);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
const char* str = "12345678901234567890";
|
const char* str = "12345678901234567890";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user