Added support for manually registering test functions.

As discussed in #421
This commit is contained in:
Phil Nash 2015-11-20 16:54:07 +00:00
parent e4fa62a14e
commit 0e64973f55
8 changed files with 95 additions and 40 deletions

View file

@ -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;