mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-20 19:45:40 +02:00
Added support for manually registering test functions.
As discussed in #421
This commit is contained in:
@@ -449,3 +449,13 @@ TEST_CASE( "Long text is truncted", "[Text][Truncated]" ) {
|
||||
CHECK_THAT( t.toString(), EndsWith( "... message truncated due to excessive size" ) );
|
||||
|
||||
}
|
||||
|
||||
inline void manuallyRegisteredTestFunction() {
|
||||
SUCCEED( "was called" );
|
||||
}
|
||||
struct AutoTestReg {
|
||||
AutoTestReg() {
|
||||
REGISTER_TEST_CASE( manuallyRegisteredTestFunction, "ManuallyRegistered", "" );
|
||||
}
|
||||
};
|
||||
AutoTestReg autoTestReg;
|
||||
|
Reference in New Issue
Block a user