Browse Source

fix performSelector warning

Daniel Zlotin 7 years ago
parent
commit
4b5e066046
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      lib/ios/ReactNativeNavigationTests/RNNCommandsHandlerTest.m

+ 3
- 1
lib/ios/ReactNativeNavigationTests/RNNCommandsHandlerTest.m View File

@@ -45,7 +45,9 @@
45 45
 	
46 46
 	for (NSString* methodName in methods) {
47 47
 		SEL s = NSSelectorFromString(methodName);
48
-		XCTAssertThrowsSpecificNamed([uut performSelector:s withObject:nil], NSException, @"BridgeNotLoadedError");
48
+		IMP imp = [uut methodForSelector:s];
49
+		void (*func)(id, SEL) = (void *)imp;
50
+		XCTAssertThrowsSpecificNamed(func(uut,s), NSException, @"BridgeNotLoadedError");
49 51
 	}
50 52
 }
51 53