diff options
author | anonymous <local@localhost> | 2010-09-20 00:26:10 +0000 |
---|---|---|
committer | anonymous <local@localhost> | 2010-09-20 00:26:10 +0000 |
commit | 7aac3649a100e6fc1660d99e9b4b6234e640a486 (patch) | |
tree | e84b143fb061d9cd07bc5e1d9a33197ca48253f9 | |
parent | c459eafb18cfe8f7c70744f8b5af99d5ad1574f9 (diff) | |
download | libcxxrt-7aac3649a100e6fc1660d99e9b4b6234e640a486.tar.gz libcxxrt-7aac3649a100e6fc1660d99e9b4b6234e640a486.tar.bz2 libcxxrt-7aac3649a100e6fc1660d99e9b4b6234e640a486.tar.xz |
Fixes the test case
-rw-r--r-- | test/test_exception.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test_exception.cc b/test/test_exception.cc index dde7492..6a81b93 100644 --- a/test/test_exception.cc +++ b/test/test_exception.cc @@ -136,20 +136,23 @@ void test_nested() } } +static int violations = 0; static void throw_zero() { + violations++; throw 0; } void test_exceptions(void) { + std::set_unexpected(throw_zero); TEST_CLEANUP(test_catch(0)); TEST_CLEANUP(test_catch(1)); TEST_CLEANUP(test_catch(3)); TEST_CLEANUP(test_catch(4)); TEST_CLEANUP(test_nested()); - std::set_unexpected(throw_zero); test_catch(2); + TEST(violations == 1, "Exactly one exception spec violation"); //printf("Test: %s\n", } |