Sha256: 517cd3d1b115478b5b6af2bac61d11748fca216ccd6574f2fcab8d1ab6d370db
Contents?: true
Size: 1.4 KB
Versions: 18
Compression:
Stored size: 1.4 KB
Contents
#ifndef SPT_SUBCLASS #define SPT_SUBCLASS SPTXCTestCase #endif #define _SPTSpecBegin(name, file, line) \ @interface name##Spec : SPT_SUBCLASS \ @end \ @implementation name##Spec \ - (void)spt_defineSpec { \ const char *specFileName = file; \ @try { \ [self spt_setCurrentSpecWithFileName:(file) lineNumber:(line)]; #define _SPTSpecEnd \ [self spt_unsetCurrentSpec]; \ } @catch(NSException *exception) { \ fprintf(stderr, "%s: An exception has occured outside of tests, aborting.\n\n%s (%s) \n", specFileName, [[exception name] UTF8String], [[exception reason] UTF8String]); \ if ([exception respondsToSelector:@selector(callStackSymbols)]) { \ NSArray *callStackSymbols = [exception callStackSymbols]; \ if (callStackSymbols) { \ NSString *callStack = [NSString stringWithFormat:@"\n Call Stack:\n %@\n", [callStackSymbols componentsJoinedByString:@"\n "]]; \ fprintf(stderr, "%s", [callStack UTF8String]); \ } \ } \ exit(1); \ } \ } \ @end #define _SPTSharedExampleGroupsBegin(name) \ @interface name##SharedExampleGroups : SPTSharedExampleGroups \ @end \ @implementation name##SharedExampleGroups \ + (void)defineSharedExampleGroups { #define _SPTSharedExampleGroupsEnd \ } \ @end #undef _XCTRegisterFailure #define _XCTRegisterFailure(condition, format...) \ ({ \ _XCTFailureHandler((id)self, YES, __FILE__, __LINE__, condition, @"" format); \ })
Version data entries
18 entries across 6 versions & 1 rubygems