summaryrefslogtreecommitdiffstats
path: root/libcxxabi/test/catch_pointer_nullptr.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxxabi/test/catch_pointer_nullptr.pass.cpp')
-rw-r--r--libcxxabi/test/catch_pointer_nullptr.pass.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/libcxxabi/test/catch_pointer_nullptr.pass.cpp b/libcxxabi/test/catch_pointer_nullptr.pass.cpp
index e0acb89f59d..58fd827904f 100644
--- a/libcxxabi/test/catch_pointer_nullptr.pass.cpp
+++ b/libcxxabi/test/catch_pointer_nullptr.pass.cpp
@@ -21,8 +21,9 @@ void test1()
throw nullptr;
assert(false);
}
- catch (int*)
+ catch (int* p)
{
+ assert(!p);
}
catch (long*)
{
@@ -37,8 +38,9 @@ void test2()
throw nullptr;
assert(false);
}
- catch (A*)
+ catch (A* p)
{
+ assert(!p);
}
catch (int*)
{
@@ -51,8 +53,8 @@ void catch_nullptr_test() {
try {
throw nullptr;
assert(false);
- } catch (Catch) {
- // nothing todo
+ } catch (Catch c) {
+ assert(!c);
} catch (...) {
assert(false);
}
OpenPOWER on IntegriCloud