summaryrefslogtreecommitdiff
path: root/ACE/tests/Compiler_Features_13_Test.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2020-05-11 11:44:12 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2020-05-11 11:44:12 +0200
commit6747a42958f938531aa6886b381cc6c6bec1c0da (patch)
tree61c12e8b0aaf4cfbe023c4d15ae5767ad88a5505 /ACE/tests/Compiler_Features_13_Test.cpp
parentea0cd275457e067cae0ab833d5821fd6496855f5 (diff)
downloadATCD-6747a42958f938531aa6886b381cc6c6bec1c0da.tar.gz
An incorrect dynamic_cast should throw std::bad_cast which is derived from std::exception, let us test that we get std::bad_cast
* ACE/tests/Compiler_Features_13_Test.cpp:
Diffstat (limited to 'ACE/tests/Compiler_Features_13_Test.cpp')
-rw-r--r--ACE/tests/Compiler_Features_13_Test.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/ACE/tests/Compiler_Features_13_Test.cpp b/ACE/tests/Compiler_Features_13_Test.cpp
index 61dd46be09a..39436dea3fd 100644
--- a/ACE/tests/Compiler_Features_13_Test.cpp
+++ b/ACE/tests/Compiler_Features_13_Test.cpp
@@ -1,6 +1,4 @@
/**
- * @file
- *
* This program checks if the compiler / platform supports the
* standard cast operators template parameters. The motivation for
* this test was a discussion on the development mailing list, and the
@@ -42,7 +40,6 @@ namespace
};
}
-
int
run_main (int, ACE_TCHAR *[])
{
@@ -103,7 +100,7 @@ run_main (int, ACE_TCHAR *[])
ACE_TEXT("dynamic_cast should return null\n")));
}
- // Make sure dynamic cast raises an exception
+ // Make sure dynamic cast raises a bad_cast exception
Base & b3 = a;
try
{
@@ -111,16 +108,16 @@ run_main (int, ACE_TCHAR *[])
status = 1;
ACE_ERROR((LM_ERROR,
- ACE_TEXT("dynamic_cast should have raised exception\n")));
+ ACE_TEXT("dynamic_cast should have raised std::bad_cast\n")));
}
- catch(std::exception const &)
+ catch(std::bad_cast const &)
{
}
catch(...)
{
status = 1;
ACE_ERROR((LM_ERROR,
- ACE_TEXT("dynamic_cast should have raised std::exception\n")));
+ ACE_TEXT("dynamic_cast should have raised std::bad_cast\n")));
}
{