mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-27 15:09:33 +00:00
Added support for manually registering test functions.
As discussed in #421
This commit is contained in:
parent
e4fa62a14e
commit
0e64973f55
8 changed files with 95 additions and 40 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue