Skip to content
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

Catch: resolve inconsistency in CATCH_REQUIRE_THROWS #1536

Merged

Conversation

suspend0
Copy link
Contributor

@suspend0 suspend0 commented Feb 8, 2019

Description

The REQUIRE_THROWS and CATCH_REQUIRE_THROWS macros have
a subtle inconsistency in their implementation which can
cause a warning if [-Wunused-value] is used.

This commit changes CATCH_REQUIRE_THROWS so it has the
same implementation as REQUIRE_THROWS

It looks like REQUIRE_THROWS was changed in commit
fae0fa4 but not CHECK_REQUIRE_THROWS.

Tested on:

flydale-north:debug-build$ c++ --version
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin17.7.0
Thread model: posix

The REQUIRE_THROWS and CATCH_REQUIRE_THROWS macros have
a subtle inconsistency in their implementation which can
cause a warning if [-Wunused-value] is used.

This commit changes CATCH_REQUIRE_THROWS so it has the
same implementation as REQUIRE_THROWS

It looks like REQUIRE_THROWS was change in commit
fae0fa4 but not CATCH_REQUIRE_THROWS.

Similar changes for CATCH_CHECK_THROWS
@suspend0 suspend0 force-pushed the catch-require-throws-inconsistency branch from f522ca5 to 8c35a66 Compare February 8, 2019 19:32
@codecov
Copy link

codecov bot commented Feb 8, 2019

Codecov Report

Merging #1536 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master   #1536   +/-   ##
======================================
  Coverage    80.6%   80.6%           
======================================
  Files         121     121           
  Lines        3386    3386           
======================================
  Hits         2729    2729           
  Misses        657     657

@JoeyGrajciar JoeyGrajciar merged commit 9ccea82 into catchorg:master Feb 9, 2019
@suspend0 suspend0 deleted the catch-require-throws-inconsistency branch February 10, 2019 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants