Small cleanup of self tests

This commit is contained in:
Martin Hořeňovský 2019-08-04 13:50:25 +02:00
parent 7dc7d77af2
commit 3701c2e2e6
No known key found for this signature in database
GPG key ID: DE48307B8B0D381A
8 changed files with 82 additions and 73 deletions

View file

@ -194,6 +194,31 @@ namespace { namespace CompilationTests {
REQUIRE(std::is_same<TypeList<int>, TypeList<int>>::value);
}
// #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