From: Daniel Arndt Date: Tue, 18 Feb 2020 04:26:23 +0000 (-0500) Subject: Add comments describing the redefinition X-Git-Tag: v9.2.0-rc1~503^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d42c9b450a1f1dfe1e26b0ca8ff177e4696302bb;p=dealii.git Add comments describing the redefinition --- diff --git a/.clang-format b/.clang-format index 3d294fafa2..8704ab69cd 100644 --- a/.clang-format +++ b/.clang-format @@ -127,6 +127,8 @@ IncludeCategories: # should not be caught here - Regex: "<[a-z_]+>" Priority: 100000 +# make sure that "../tests.h" appears before all other local include files +# such that replacing Assert in tests also applies to the testing header files. - Regex: "\\.\\./tests\\.h" Priority: 200000 diff --git a/tests/tests.h b/tests/tests.h index 5de7e366e8..749f462425 100644 --- a/tests/tests.h +++ b/tests/tests.h @@ -64,6 +64,10 @@ struct DisableWindowsDebugRuntimeDialog } deal_II_windows_crt_dialog; #endif +// Redefine Assert as AssertThrow to make sure that the code is tested similarly +// in Release mode and in Debug mode. clang-format makes sure that this file is +// included after all regular header files but before all the other local header +// files. #undef Assert #define Assert AssertThrow