diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2017-06-22 00:49:03 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2017-06-22 00:49:03 +0000 |
commit | f74609b15f941cf5af298d5e983de2274118f988 (patch) | |
tree | bb6d8f919059af3c791991d086fdd0c6510c553e /libcxxabi | |
parent | f9df4290689c34e1cf5db948c1a6cdbfd5cb13a0 (diff) | |
download | llvm-f74609b15f941cf5af298d5e983de2274118f988.zip llvm-f74609b15f941cf5af298d5e983de2274118f988.tar.gz llvm-f74609b15f941cf5af298d5e983de2274118f988.tar.bz2 |
Add some catch(...) blocks to the tests so that if they fail, we get a good error message. No functional change.
llvm-svn: 305977
Diffstat (limited to 'libcxxabi')
-rw-r--r-- | libcxxabi/test/incomplete_type.sh.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libcxxabi/test/incomplete_type.sh.cpp b/libcxxabi/test/incomplete_type.sh.cpp index cefefc2..86ff7da 100644 --- a/libcxxabi/test/incomplete_type.sh.cpp +++ b/libcxxabi/test/incomplete_type.sh.cpp @@ -91,6 +91,8 @@ int main() { } catch (int NeverDefined::*p) { assert(!p); } + catch(...) { assert(!"FAIL: Didn't catch NeverDefined::*" ); } + AssertIncompleteTypeInfoEquals(ReturnTypeInfoIncompleteMP(), typeid(int IncompleteAtThrow::*)); try { ThrowIncompleteMP(); @@ -104,6 +106,7 @@ int main() { } catch (int IncompleteAtThrow::*p) { assert(!p); } + catch(...) { assert(!"FAIL: Didn't catch IncompleteAtThrow::*" ); } AssertIncompleteTypeInfoEquals(ReturnTypeInfoIncompletePP(), typeid(IncompleteAtThrow**)); try { @@ -114,6 +117,7 @@ int main() { } catch (IncompleteAtThrow** p) { assert(!p); } + catch(...) { assert(!"FAIL: Didn't catch IncompleteAtThrow**" ); } try { ThrowIncompletePMP(); @@ -125,6 +129,7 @@ int main() { } catch (int IncompleteAtThrow::**p) { assert(!p); } + catch(...) { assert(!"FAIL: Didn't catch IncompleteAtThrow::**" ); } AssertIncompleteTypeInfoEquals(ReturnTypeInfoCompleteMP(), typeid(int CompleteAtThrow::*)); try { @@ -139,6 +144,7 @@ int main() { } catch (int CompleteAtThrow::*p) { assert(!p); } + catch(...) { assert(!"FAIL: Didn't catch CompleteAtThrow::" ); } AssertIncompleteTypeInfoEquals(ReturnTypeInfoCompletePP(), typeid(CompleteAtThrow**)); try { @@ -153,6 +159,7 @@ int main() { } catch (CompleteAtThrow**p) { assert(!p); } + catch(...) { assert(!"FAIL: Didn't catch CompleteAtThrow**" ); } try { ThrowCompletePMP(); @@ -168,6 +175,7 @@ int main() { } catch (int CompleteAtThrow::**p) { assert(!p); } + catch(...) { assert(!"FAIL: Didn't catch CompleteAtThrow::**" ); } #if __cplusplus >= 201103L // Catch nullptr as complete type @@ -176,6 +184,7 @@ int main() { } catch (int IncompleteAtThrow::*p) { assert(!p); } + catch(...) { assert(!"FAIL: Didn't catch nullptr as IncompleteAtThrow::*" ); } // Catch nullptr as an incomplete type try { @@ -183,12 +192,16 @@ int main() { } catch (int CompleteAtThrow::*p) { assert(!p); } + catch(...) { assert(!"FAIL: Didn't catch nullptr as CompleteAtThrow::*" ); } + // Catch nullptr as a type that is never complete. try { ThrowNullptr(); } catch (int NeverDefined::*p) { assert(!p); } + catch(...) { assert(!"FAIL: Didn't catch nullptr as NeverDefined::*" ); } + #endif } #endif |