Fix up the tests I added for string exceptions to be skipped when exceptions are disabled

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@258279 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2016-01-20 03:19:15 +00:00
parent 14a9008568
commit 85d4c2a93f
5 changed files with 29 additions and 0 deletions

View File

@@ -990,6 +990,7 @@ int main()
test8<S>();
}
#endif
#ifndef TEST_HAS_NO_EXCEPTIONS
{ // test iterator operations that throw
typedef std::string S;
typedef ThrowingIterator<char> TIter;
@@ -1003,4 +1004,5 @@ int main()
test_exceptions(S("abcdefghijklmnopqrst"), 10, 5, TIter(s, s+10, 5, TIter::TADereference), TIter());
test_exceptions(S("abcdefghijklmnopqrst"), 10, 5, TIter(s, s+10, 6, TIter::TAComparison), TIter());
}
#endif
}