-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V2.x. Back-port PR #2334 to the v2.x branch #2581
Open
ScottHutchinson
wants to merge
6
commits into
catchorg:v2.x
Choose a base branch
from
ScottHutchinson:v2.x
base: v2.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6ba264b
Wrap all std::min and std::max calls in parentheses
ScottHutchinson 428a30e
Merge branch 'catchorg:v2.x' into v2.x
ScottHutchinson 2552ed0
Fix issue with Address Sanitizer on Windows.
ScottHutchinson 845c353
fix include statement
ScottHutchinson 5dc0474
Update to match the latest devel (v3) branch.
ScottHutchinson ed3bcd3
Fix build errors.
ScottHutchinson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
*/ | ||
|
||
#include "catch.hpp" | ||
#include "internal/catch_windows_h_proxy.h" | ||
|
||
#ifdef __clang__ | ||
# pragma clang diagnostic ignored "-Wc++98-compat" | ||
|
@@ -491,3 +492,34 @@ TEMPLATE_TEST_CASE_SIG("#1954 - 7 arg template test case sig compiles", "[regres | |
} | ||
|
||
}} // namespace MiscTests | ||
|
||
#if defined(CATCH_PLATFORM_WINDOWS) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test in v3 only checks with MSVC. Why the change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I certainly didn't mean to change it. |
||
void throw_and_catch() | ||
{ | ||
__try { | ||
RaiseException(0xC0000005, 0, 0, NULL); | ||
} | ||
__except (1) | ||
{ | ||
|
||
} | ||
} | ||
|
||
|
||
TEST_CASE("Validate SEH behavior - handled", "[approvals][FatalConditionHandler][CATCH_PLATFORM_WINDOWS]") | ||
{ | ||
// Validate that Catch2 framework correctly handles tests raising and handling SEH exceptions. | ||
throw_and_catch(); | ||
} | ||
|
||
void throw_no_catch() | ||
{ | ||
RaiseException(0xC0000005, 0, 0, NULL); | ||
} | ||
|
||
TEST_CASE("Validate SEH behavior - unhandled", "[.approvals][FatalConditionHandler][CATCH_PLATFORM_WINDOWS]") | ||
{ | ||
// Validate that Catch2 framework correctly handles tests raising and not handling SEH exceptions. | ||
throw_no_catch(); | ||
} | ||
#endif |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar question: the code in v3 does not need the wild reinterpret cast. Why is it needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought sure I just copied the code from v3. I'll look at it no later than Monday. Thanks.