Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorMartin Hořeňovský2022-06-05 14:51:34 +0200
committerMartin Hořeňovský2022-06-06 00:29:01 +0200
commitff9506cedd423a72a6b9ff1f827aae74c8166117 (patch)
tree099893b58fdc5381704f354900910fc767dbad48 /tests
parent0c13d021da4ff937a33279207fb57e000781d86c (diff)
downloadcatch3-ff9506cedd423a72a6b9ff1f827aae74c8166117.tar.gz
Only test SEH handling with MSVC
MinGW doesn't support `__try` and friends at all, while Clang only supports it partially, and the test would require some changes to make it work there. Since this is only a test, we can afford to keep it MSVC-only. Closes #2447
Diffstat (limited to 'tests')
-rw-r--r--tests/SelfTest/UsageTests/Misc.tests.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/SelfTest/UsageTests/Misc.tests.cpp b/tests/SelfTest/UsageTests/Misc.tests.cpp
index 2e4badf5..93b5ff1e 100644
--- a/tests/SelfTest/UsageTests/Misc.tests.cpp
+++ b/tests/SelfTest/UsageTests/Misc.tests.cpp
@@ -508,7 +508,8 @@ TEMPLATE_TEST_CASE_SIG("#1954 - 7 arg template test case sig compiles", "[regres
TEST_CASE("Same test name but with different tags is fine", "[.approvals][some-tag]") {}
TEST_CASE("Same test name but with different tags is fine", "[.approvals][other-tag]") {}
-#if defined(CATCH_PLATFORM_WINDOWS)
+// MinGW doesn't support __try, and Clang has only very partial support
+#if defined(_MSC_VER)
void throw_and_catch()
{
__try {
@@ -549,4 +550,4 @@ TEST_CASE("Validate SEH behavior - no crash for stack unwinding", "[approvals][!
throw 1;
}
-#endif // CATCH_PLATFORM_WINDOWS
+#endif // _MSC_VER