diff options
| author | Phil Nash | 2015-11-20 16:54:07 +0000 |
|---|---|---|
| committer | Phil Nash | 2015-11-20 16:58:16 +0000 |
| commit | 0e64973f55d69e01b057b3d3450433eca73797e6 (patch) | |
| tree | 2b80a6ad4dfa6deaf83dc47a329fd4dff6c87070 /projects/SelfTest/TestMain.cpp | |
| parent | e4fa62a14e26241b8eb2b585be8ad459b73bddc6 (diff) | |
| download | catch3-0e64973f55d69e01b057b3d3450433eca73797e6.tar.gz | |
Added support for manually registering test functions.
As discussed in #421
Diffstat (limited to 'projects/SelfTest/TestMain.cpp')
| -rw-r--r-- | projects/SelfTest/TestMain.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/projects/SelfTest/TestMain.cpp b/projects/SelfTest/TestMain.cpp index bffc7e77..1713b51a 100644 --- a/projects/SelfTest/TestMain.cpp +++ b/projects/SelfTest/TestMain.cpp @@ -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; |