aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/enableExceptions/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/blackbox/testdata/enableExceptions/main.cpp')
-rw-r--r--tests/auto/blackbox/testdata/enableExceptions/main.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/enableExceptions/main.cpp b/tests/auto/blackbox/testdata/enableExceptions/main.cpp
new file mode 100644
index 000000000..1b99ea96d
--- /dev/null
+++ b/tests/auto/blackbox/testdata/enableExceptions/main.cpp
@@ -0,0 +1,8 @@
+#include <stdexcept>
+
+int main() {
+#ifdef FORCE_FAIL_VS
+#error "Microsoft Visual C++ cannot disable exceptions at compile-time"
+#endif
+ throw std::runtime_error("failed");
+}