Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

iPhone test runner adds OC_TEST_CASEs

Commit
5de646c7286a08ad821f226e897de64e5c470124
Author
Phil Nash ·
Parents
84b394ec451f

Files · Download .tar.gz

Changes

 runners/iTchRunner/internal/iTchRunnerMainView.h | 3 ++-
 runners/iTchRunner/itChRunnerMain.mm             | 6 ++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/runners/iTchRunner/internal/iTchRunnerMainView.h b/runners/iTchRunner/internal/iTchRunnerMainView.h
index c9d85ae0..b745c216 100644
--- a/runners/iTchRunner/internal/iTchRunnerMainView.h
+++ b/runners/iTchRunner/internal/iTchRunnerMainView.h
@@ -76,12 +76,13 @@
 
     if( runner.getFailureCount() == 0 )
     {
-        NSLog( @"%d", runner.getFailureCount() );
+        NSLog( @"no failures" );
         if( runner.getSuccessCount() > 0 )
             appName.textColor = [[UIColor alloc] initWithRed:0.35 green:1 blue:0.35 alpha:1];
     }
     else
     {
+        NSLog( @"%d failures", runner.getFailureCount() );
         appName.textColor = [[UIColor alloc] initWithRed:1 green:0.35 blue:0.35 alpha:1];
     }
 }
diff --git a/runners/iTchRunner/itChRunnerMain.mm b/runners/iTchRunner/itChRunnerMain.mm
index 5a2b51f0..88451962 100644
--- a/runners/iTchRunner/itChRunnerMain.mm
+++ b/runners/iTchRunner/itChRunnerMain.mm
@@ -7,11 +7,13 @@
 //
 
 #import "internal/iTchRunnerAppDelegate.h"
+#include "catch_objc.hpp"
 
 int main(int argc, char *argv[]) 
-{
-    
+{    
     NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+
+    Catch::registerTestMethods();
     int retVal = UIApplicationMain(argc, argv, nil, @"iTchRunnerAppDelegate");
     [pool release];
     return retVal;