diff options
| author | Phil Nash | 2015-11-20 16:54:07 +0000 |
|---|---|---|
| committer | Phil Nash | 2015-11-20 16:54:07 +0000 |
| commit | bd8688cded74c858105c8b858e4c5a52a9ce26be (patch) | |
| tree | c9065bad34baf476780ba10745890c6f7d8f330e /projects/SelfTest/TestMain.cpp | |
| parent | c70170e90437a224a22176a8b01b11dd5f2c3d15 (diff) | |
| download | catch3-bd8688cded74c858105c8b858e4c5a52a9ce26be.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; |