aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/enableRtti
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-06-08 18:18:57 -0700
committerJake Petroules <jake.petroules@qt.io>2017-06-09 09:58:22 +0000
commitdd4f79167e15c563c521663a05143c18063d22f2 (patch)
tree17a68dff53a60d4da202c0285ddebbae2b29b6d8 /tests/auto/blackbox/testdata/enableRtti
parentf6be7de4a54a40ff5de57e35b91c8de23d3a5ed4 (diff)
Tighten up enableExceptions and enableRtti autotests
Some older versions of Clang don't produce an error when using dynamic_cast in source code compiled with -fno-rtti. So explicitly error out when rtti or exceptions are not available. Change-Id: I9d5e1f37355059685337aead6918a91f067c2338 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/auto/blackbox/testdata/enableRtti')
-rw-r--r--tests/auto/blackbox/testdata/enableRtti/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/enableRtti/main.cpp b/tests/auto/blackbox/testdata/enableRtti/main.cpp
index 1a30228d6..6301561b3 100644
--- a/tests/auto/blackbox/testdata/enableRtti/main.cpp
+++ b/tests/auto/blackbox/testdata/enableRtti/main.cpp
@@ -28,6 +28,10 @@
#include <typeinfo>
+#if defined(__GNUC__) && !(defined(__cpp_rtti) || defined(__GXX_RTTI))
+#error RTTI is disabled!
+#endif
+
class I {
public:
virtual ~I() { }