diff options
| author | Martin Hořeňovský | 2019-08-04 13:50:25 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2019-08-04 13:50:25 +0200 |
| commit | 3701c2e2e645df69e28914c72bf5c75158fa6613 (patch) | |
| tree | 6fcd1020d35525d9dcdd27bde34dbfb872bee12d /projects/SelfTest/UsageTests/Compilation.tests.cpp | |
| parent | 7dc7d77af2044d12b136f4df007f16628c1add04 (diff) | |
| download | catch3-3701c2e2e645df69e28914c72bf5c75158fa6613.tar.gz | |
Small cleanup of self tests
Diffstat (limited to 'projects/SelfTest/UsageTests/Compilation.tests.cpp')
| -rw-r--r-- | projects/SelfTest/UsageTests/Compilation.tests.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/projects/SelfTest/UsageTests/Compilation.tests.cpp b/projects/SelfTest/UsageTests/Compilation.tests.cpp index 7f2ad8bc..11d136a4 100644 --- a/projects/SelfTest/UsageTests/Compilation.tests.cpp +++ b/projects/SelfTest/UsageTests/Compilation.tests.cpp @@ -194,6 +194,31 @@ namespace { namespace CompilationTests { REQUIRE(std::is_same<TypeList<int>, TypeList<int>>::value); } -}} // namespace CompilationTests + // #925 + using signal_t = void (*) (void*); + + struct TestClass { + signal_t testMethod_uponComplete_arg = nullptr; + }; + namespace utility { + inline static void synchronizing_callback( void * ) { } + } + + TEST_CASE("#925: comparing function pointer to function address failed to compile", "[!nonportable]" ) { + TestClass test; + REQUIRE(utility::synchronizing_callback != test.testMethod_uponComplete_arg); + } + + TEST_CASE( "#1027: Bitfields can be captured" ) { + struct Y { + uint32_t v : 1; + }; + Y y{ 0 }; + REQUIRE( y.v == 0 ); + REQUIRE( 0 == y.v ); + } + + +}} // namespace CompilationTests |