diff --git a/Makefile b/Makefile index 854ff029..2f791621 100644 --- a/Makefile +++ b/Makefile @@ -47,3 +47,4 @@ test: debug .PHONY: clang-format clang-format: docker run --rm -v $(CURDIR):/root/sources bkryza/clang-format-check:1.2 + sudo chown -R $(shell id -u):$(shell id -g) src/* diff --git a/tests/catch.h b/tests/catch.h index 11a2d06e..4ca67455 100644 --- a/tests/catch.h +++ b/tests/catch.h @@ -4627,31 +4627,33 @@ auto makeMatchExpr(ArgT const &arg, MatcherT const &matcher, } while (false) /////////////////////////////////////////////////////////////////////////////// -#define INTERNAL_CATCH_THROWS_MATCHES( \ - macroName, exceptionType, resultDisposition, matcher, ...) \ - do { \ - Catch::AssertionHandler catchAssertionHandler(macroName##_catch_sr, \ - CATCH_INTERNAL_LINEINFO, \ - CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) "," \ - " " CATCH_INTERNAL_STRINGIFY( \ - exceptionType) "," \ - " " CATCH_INTERNAL_STRINGIFY(matcher), \ - resultDisposition); \ - if (catchAssertionHandler.allowThrows()) \ - try { \ - static_cast(__VA_ARGS__); \ - catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \ - } \ - catch (exceptionType const &ex) { \ - catchAssertionHandler.handleExpr( \ - Catch::makeMatchExpr(ex, matcher, #matcher##_catch_sr)); \ - } \ - catch (...) { \ - catchAssertionHandler.handleUnexpectedInflightException(); \ - } \ - else \ - catchAssertionHandler.handleThrowingCallSkipped(); \ - INTERNAL_CATCH_REACT(catchAssertionHandler) \ +#define INTERNAL_CATCH_THROWS_MATCHES( \ + macroName, exceptionType, resultDisposition, matcher, ...) \ + do { \ + Catch::AssertionHandler catchAssertionHandler(macroName##_catch_sr, \ + CATCH_INTERNAL_LINEINFO, \ + CATCH_INTERNAL_STRINGIFY( \ + __VA_ARGS__) "," \ + " " CATCH_INTERNAL_STRINGIFY( \ + exceptionType) "," \ + " " CATCH_INTERNAL_STRINGIFY( \ + matcher), \ + resultDisposition); \ + if (catchAssertionHandler.allowThrows()) \ + try { \ + static_cast(__VA_ARGS__); \ + catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \ + } \ + catch (exceptionType const &ex) { \ + catchAssertionHandler.handleExpr( \ + Catch::makeMatchExpr(ex, matcher, #matcher##_catch_sr)); \ + } \ + catch (...) { \ + catchAssertionHandler.handleUnexpectedInflightException(); \ + } \ + else \ + catchAssertionHandler.handleThrowingCallSkipped(); \ + INTERNAL_CATCH_REACT(catchAssertionHandler) \ } while (false) // end catch_capture_matchers.h