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

First cut of iOS test runner

Commit
c8f12e1175022978a4c218129f0cf0c625a25110
Author
Phil Nash ·
Parents
9e33fdd46553

Files · Download .tar.gz

Changes

 runners/iTchRunner/internal/iTchRunnerMainView.h | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/runners/iTchRunner/internal/iTchRunnerMainView.h b/runners/iTchRunner/internal/iTchRunnerMainView.h
index ac8c2805..c9d85ae0 100644
--- a/runners/iTchRunner/internal/iTchRunnerMainView.h
+++ b/runners/iTchRunner/internal/iTchRunnerMainView.h
@@ -41,11 +41,7 @@
         [appName.textColor release];
         appName.textAlignment = UITextAlignmentCenter;
         
-        NSString* appNameStr = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
-        if( [appNameStr isEqualToString:@"iTchRunner"] )
-            appName.text = @"iTchRunner self-tests";
-        else
-            appName.text = [NSString stringWithFormat:@"CATCH tests for %@", appNameStr];
+        appName.text = [NSString stringWithFormat:@"CATCH tests"];
 
     
         UIActionSheet* menu = [[UIActionSheet alloc] initWithTitle:@"Options"
@@ -77,6 +73,17 @@
     config.getReporter()->StartGroup( "" );
     runner.runAll( true );
     config.getReporter()->EndGroup( "", runner.getSuccessCount(), runner.getFailureCount() );
+
+    if( runner.getFailureCount() == 0 )
+    {
+        NSLog( @"%d", runner.getFailureCount() );
+        if( runner.getSuccessCount() > 0 )
+            appName.textColor = [[UIColor alloc] initWithRed:0.35 green:1 blue:0.35 alpha:1];
+    }
+    else
+    {
+        appName.textColor = [[UIColor alloc] initWithRed:1 green:0.35 blue:0.35 alpha:1];
+    }
 }
 
 ///////////////////////////////////////////////////////////////////////////////