Commits

Tuukka Norri committed 0443dfd

Added a check for unexpected exceptions

Comments (0)

Files changed (3)

UnitTests/Sources/BXDatabaseObjectTests.m

 
 #import "BXDatabaseObjectTests.h"
 #import "MKCSenTestCaseAdditions.h"
+#import <OCMock/OCMock.h>
 
-#import <OCMock/OCMock.h>
 #import <BaseTen/BaseTen.h>
 #import <BaseTen/BXDatabaseObjectPrivate.h>
 #import <BaseTen/BXDatabaseContextPrivate.h>

UnitTests/Sources/PGTSHOMTests.m

 
 #import "PGTSHOMTests.h"
 #import "MKCSenTestCaseAdditions.h"
+#import <OCMock/OCMock.h>
 #import <BaseTen/PGTSHOM.h>
-#import <OCMock/OCMock.h>
 
 
 @implementation PGTSHOMTests

UnitTests/Sources/TestLoader.m

 	
 	for (Class testCaseClass in testClasses)
 	{
-		SenTestSuite* suite = [SenTestSuite testSuiteForTestCaseClass: testCaseClass];
-		[suite run];
+		SenTestSuite *suite = [SenTestSuite testSuiteForTestCaseClass: testCaseClass];
+		SenTestRun *testRun = [suite run];
+		STAssertTrue (0 == [testRun unexpectedExceptionCount], @"Had %u unexpected exceptions.", [testRun unexpectedExceptionCount]);
 	}
 }
 @end