Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/projects/SelfTest/TestMain.cpp
diff options
context:
space:
mode:
authorPhil Nash2015-11-20 16:54:07 +0000
committerPhil Nash2015-11-20 16:58:16 +0000
commit0e64973f55d69e01b057b3d3450433eca73797e6 (patch)
tree2b80a6ad4dfa6deaf83dc47a329fd4dff6c87070 /projects/SelfTest/TestMain.cpp
parente4fa62a14e26241b8eb2b585be8ad459b73bddc6 (diff)
downloadcatch3-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.cpp10
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;