Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Break ternary operator into conditional.

Ternary operator much too long to read. Break into a conditional block
to improve readability.
  • Loading branch information...
commit 81cc1bdb267af46740db5561c31e948d04106a67 1 parent 286ebfa
Brian Gesiak modocache authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 SenTestingKit/SenTestSuite+KiwiAdditions.m
7 SenTestingKit/SenTestSuite+KiwiAdditions.m
View
@@ -37,7 +37,12 @@ + (void)patchTestSuiteForTestCaseClassIMP {
IMP focusedSuite = imp_implementationWithBlock(^(id _self, Class aClass){
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
- return ([[KWExampleSuiteBuilder sharedExampleSuiteBuilder] isFocused] && ![_self testSuiteClassHasFocus:aClass]) ? nil : (__bridge void *)[_self performSelector:newSEL withObject:aClass];
+ if ([[KWExampleSuiteBuilder sharedExampleSuiteBuilder] isFocused] &&
+ ![_self testSuiteClassHasFocus:aClass]) {
+ return nil;
+ } else {
+ return (__bridge void *)[_self performSelector:newSEL withObject:aClass];
+ }
#pragma clang diagnostic pop
});
method_setImplementation(origMethod, focusedSuite);
Please sign in to comment.
Something went wrong with that request. Please try again.