diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2016-01-20 03:19:15 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2016-01-20 03:19:15 +0000 |
commit | 9d10d27c6746199c736427556e27f94a5d055038 (patch) | |
tree | 9a5c48fde0ed619b335e9c32ee4423174e809020 /libcxx/test/support/test_iterators.h | |
parent | efa5f6c1700b9b4298a5f5501e4080405f2df4c1 (diff) | |
download | bcm5719-llvm-9d10d27c6746199c736427556e27f94a5d055038.tar.gz bcm5719-llvm-9d10d27c6746199c736427556e27f94a5d055038.zip |
Fix up the tests I added for string exceptions to be skipped when exceptions are disabled
llvm-svn: 258279
Diffstat (limited to 'libcxx/test/support/test_iterators.h')
-rw-r--r-- | libcxx/test/support/test_iterators.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libcxx/test/support/test_iterators.h b/libcxx/test/support/test_iterators.h index d814879fa27..929c18b4d32 100644 --- a/libcxx/test/support/test_iterators.h +++ b/libcxx/test/support/test_iterators.h @@ -349,7 +349,12 @@ struct ThrowingIterator { if (action_ == TAAssignment) { if (index_ == 0) +#ifndef TEST_HAS_NO_EXCEPTIONS + assert(false); +#else throw std::runtime_error ("throw from iterator assignment"); +#endif + else --index_; } @@ -367,7 +372,11 @@ struct ThrowingIterator { if (action_ == TADereference) { if (index_ == 0) +#ifndef TEST_HAS_NO_EXCEPTIONS + assert(false); +#else throw std::runtime_error ("throw from iterator dereference"); +#endif else --index_; } @@ -379,7 +388,11 @@ struct ThrowingIterator { if (action_ == TAIncrement) { if (index_ == 0) +#ifndef TEST_HAS_NO_EXCEPTIONS + assert(false); +#else throw std::runtime_error ("throw from iterator increment"); +#endif else --index_; } @@ -399,7 +412,11 @@ struct ThrowingIterator { if (action_ == TADecrement) { if (index_ == 0) +#ifndef TEST_HAS_NO_EXCEPTIONS + assert(false); +#else throw std::runtime_error ("throw from iterator decrement"); +#endif else --index_; } @@ -418,7 +435,11 @@ struct ThrowingIterator { if (action_ == TAComparison) { if (index_ == 0) +#ifndef TEST_HAS_NO_EXCEPTIONS + assert(false); +#else throw std::runtime_error ("throw from iterator comparison"); +#endif else --index_; } |