Browse Source

NoColor returns nil (#5600)

For some reason it returned cyan... probably leftover from a debug session
Guy Carmeli 4 years ago
parent
commit
0bdbf5c84e
No account linked to committer's email address

+ 2
- 7
lib/ios/NoColor.m View File

@@ -1,6 +1,4 @@
1 1
 #import "NoColor.h"
2
-#import "Color.h"
3
-
4 2
 
5 3
 @implementation NoColor
6 4
 
@@ -9,14 +7,11 @@
9 7
 }
10 8
 
11 9
 - (UIColor *)get {
12
-//    return nil;
13
-    return UIColor.cyanColor;
10
+    return nil;
14 11
 }
15 12
 
16 13
 - (UIColor *)getWithDefaultValue:(id)defaultValue {
17
-    return UIColor.cyanColor;
18
-//    return nil;
14
+    return nil;
19 15
 }
20 16
 
21
-
22 17
 @end

+ 0
- 3
lib/ios/Param.m View File

@@ -11,9 +11,7 @@
11 11
 
12 12
 - (instancetype)initWithValue:(id)value {
13 13
 	self = [super init];
14
-	
15 14
 	self.value = value;
16
-	
17 15
 	return self;
18 16
 }
19 17
 
@@ -21,7 +19,6 @@
21 19
 	if (!self.value) {
22 20
 		@throw [NSException exceptionWithName:@"Param get" reason:@"value does not exists" userInfo:nil];
23 21
 	}
24
-	
25 22
 	return self.value;
26 23
 }
27 24
 

+ 12
- 4
lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj View File

@@ -41,6 +41,7 @@
41 41
 		309877B0B5AAA7788F56F3D9 /* UIViewController+Utils.h in Headers */ = {isa = PBXBuildFile; fileRef = 30987CF6993B89E85C0BCEE4 /* UIViewController+Utils.h */; };
42 42
 		309877F473AECC05FB3B9362 /* UITabBarController+RNNUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 30987FED6F982D322416CAF2 /* UITabBarController+RNNUtils.h */; };
43 43
 		309878CC9D33CE1CF991EBD1 /* NoColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 309877ADF638DF25FF0DA8A1 /* NoColor.m */; };
44
+		309879812219F6EDD2AECAC6 /* RNNTestNoColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 309871A6C468B5DC1D0CA495 /* RNNTestNoColor.m */; };
44 45
 		30987AB5137F264FA06DA289 /* DotIndicatorOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 309876223177761614786DCC /* DotIndicatorOptions.m */; };
45 46
 		30987B23F288EB3A78B7F27C /* RNNDotIndicatorPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 30987E66AA7AB38E7370F8C8 /* RNNDotIndicatorPresenter.m */; };
46 47
 		30987CA5048A48D6CE76B06C /* DotIndicatorParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 309871FBA64AD937CEF3E191 /* DotIndicatorParser.h */; };
@@ -87,7 +88,6 @@
87 88
 		5038A374216CDDB6009280BC /* UIViewController+SideMenuController.h in Headers */ = {isa = PBXBuildFile; fileRef = 5038A372216CDDB6009280BC /* UIViewController+SideMenuController.h */; };
88 89
 		5038A375216CDDB6009280BC /* UIViewController+SideMenuController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5038A373216CDDB6009280BC /* UIViewController+SideMenuController.m */; };
89 90
 		5038A377216CF252009280BC /* UITabBarController+RNNOptionsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5038A376216CF252009280BC /* UITabBarController+RNNOptionsTest.m */; };
90
-		5038A379216D01F6009280BC /* RNNBottomTabOptionsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5038A378216D01F6009280BC /* RNNBottomTabOptionsTest.m */; };
91 91
 		5038A3B1216DF41B009280BC /* UIViewController+RNNOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 5038A3AF216DF41B009280BC /* UIViewController+RNNOptions.h */; };
92 92
 		5038A3B2216DF41B009280BC /* UIViewController+RNNOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 5038A3B0216DF41B009280BC /* UIViewController+RNNOptions.m */; };
93 93
 		5038A3B5216DF602009280BC /* UINavigationController+RNNOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 5038A3B3216DF602009280BC /* UINavigationController+RNNOptions.h */; };
@@ -379,6 +379,7 @@
379 379
 		2DCD9193200014A900EDC75D /* RNNBridgeManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNBridgeManager.h; sourceTree = "<group>"; };
380 380
 		2DCD9194200014A900EDC75D /* RNNBridgeManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNBridgeManager.m; sourceTree = "<group>"; };
381 381
 		30987122507D8CBF16624F93 /* DotIndicatorOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DotIndicatorOptions.h; sourceTree = "<group>"; };
382
+		309871A6C468B5DC1D0CA495 /* RNNTestNoColor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNTestNoColor.m; sourceTree = "<group>"; };
382 383
 		309871FBA64AD937CEF3E191 /* DotIndicatorParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DotIndicatorParser.h; sourceTree = "<group>"; };
383 384
 		3098727A36771B4902A14FEA /* RNNTestBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNTestBase.m; sourceTree = "<group>"; };
384 385
 		309874C5B132A51A03DAA3BF /* NoColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NoColor.h; sourceTree = "<group>"; };
@@ -437,7 +438,6 @@
437 438
 		5038A372216CDDB6009280BC /* UIViewController+SideMenuController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIViewController+SideMenuController.h"; sourceTree = "<group>"; };
438 439
 		5038A373216CDDB6009280BC /* UIViewController+SideMenuController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+SideMenuController.m"; sourceTree = "<group>"; };
439 440
 		5038A376216CF252009280BC /* UITabBarController+RNNOptionsTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UITabBarController+RNNOptionsTest.m"; sourceTree = "<group>"; };
440
-		5038A378216D01F6009280BC /* RNNBottomTabOptionsTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNBottomTabOptionsTest.m; sourceTree = "<group>"; };
441 441
 		5038A3AF216DF41B009280BC /* UIViewController+RNNOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIViewController+RNNOptions.h"; sourceTree = "<group>"; };
442 442
 		5038A3B0216DF41B009280BC /* UIViewController+RNNOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+RNNOptions.m"; sourceTree = "<group>"; };
443 443
 		5038A3B3216DF602009280BC /* UINavigationController+RNNOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UINavigationController+RNNOptions.h"; sourceTree = "<group>"; };
@@ -778,6 +778,14 @@
778 778
 			path = MMDrawerController;
779 779
 			sourceTree = "<group>";
780 780
 		};
781
+		30987D8ED611122B1A9E1154 /* Options */ = {
782
+			isa = PBXGroup;
783
+			children = (
784
+				309871A6C468B5DC1D0CA495 /* RNNTestNoColor.m */,
785
+			);
786
+			path = Options;
787
+			sourceTree = "<group>";
788
+		};
781 789
 		5012242C2173E0A4000F5F98 /* Parent ViewControllers */ = {
782 790
 			isa = PBXGroup;
783 791
 			children = (
@@ -1053,7 +1061,6 @@
1053 1061
 				5085DD2C21DCF75A0032E64B /* RNNSideMenuControllerTest.m */,
1054 1062
 				50206A6C21AFE75400B7BB1A /* RNNSideMenuParserTest.m */,
1055 1063
 				502F0E152178D09600367CC3 /* RNNBasePresenterTest.m */,
1056
-				5038A378216D01F6009280BC /* RNNBottomTabOptionsTest.m */,
1057 1064
 				7B49FEBF1E95090800DEB3EA /* Info.plist */,
1058 1065
 				E83BAD671F2734B500A9F3DD /* RNNNavigationOptionsTest.m */,
1059 1066
 				E83BAD781F27416B00A9F3DD /* RNNRootViewControllerTest.m */,
@@ -1066,6 +1073,7 @@
1066 1073
 				50AB0B1E22562FA10039DAED /* UIViewController+LayoutProtocolTest.m */,
1067 1074
 				505963F622676A0000EBB63C /* RNNLayoutManagerTest.m */,
1068 1075
 				30987758777622B7D6CCD695 /* RNNDotIndicatorPresenterTest.m */,
1076
+				30987D8ED611122B1A9E1154 /* Options */,
1069 1077
 			);
1070 1078
 			path = ReactNativeNavigationTests;
1071 1079
 			sourceTree = "<group>";
@@ -1470,7 +1478,6 @@
1470 1478
 				505963F722676A0000EBB63C /* RNNLayoutManagerTest.m in Sources */,
1471 1479
 				7B49FECE1E95098500DEB3EA /* RNNCommandsHandlerTest.m in Sources */,
1472 1480
 				E5F6C3AB22DB4D0F0093C2CE /* UIColor+RNNUtils.m in Sources */,
1473
-				5038A379216D01F6009280BC /* RNNBottomTabOptionsTest.m in Sources */,
1474 1481
 				E83BAD681F2734B500A9F3DD /* RNNNavigationOptionsTest.m in Sources */,
1475 1482
 				505EDD32214E4BE80071C7DE /* RNNNavigationControllerTest.m in Sources */,
1476 1483
 				50AB0B1F22562FA10039DAED /* UIViewController+LayoutProtocolTest.m in Sources */,
@@ -1491,6 +1498,7 @@
1491 1498
 				E5F6C3A722DB4D0F0093C2CE /* UIViewController+Utils.m in Sources */,
1492 1499
 				E8DA243D1F973C1900CD552B /* RNNTransitionStateHolderTest.m in Sources */,
1493 1500
 				7B49FECC1E95098500DEB3EA /* RNNExternalComponentStoreTest.m in Sources */,
1501
+				309879812219F6EDD2AECAC6 /* RNNTestNoColor.m in Sources */,
1494 1502
 			);
1495 1503
 			runOnlyForDeploymentPostprocessing = 0;
1496 1504
 		};

+ 25
- 0
lib/ios/ReactNativeNavigationTests/Options/RNNTestNoColor.m View File

@@ -0,0 +1,25 @@
1
+#import <XCTest/XCTest.h>
2
+#import "NoColor.h"
3
+
4
+@interface RNNTestNoColor : XCTestCase
5
+
6
+@property (nonatomic, retain) NoColor* uut;
7
+
8
+@end
9
+
10
+
11
+@implementation RNNTestNoColor
12
+- (void)setUp {
13
+    [super setUp];
14
+    self.uut = [[NoColor alloc] init];
15
+}
16
+
17
+- (void)testHasValue_alwaysReturnsYES {
18
+    XCTAssertEqual([_uut hasValue], YES);
19
+}
20
+
21
+- (void)testGet_returnsNil {
22
+    XCTAssertEqual(_uut.get, (UIColor *) nil);
23
+}
24
+
25
+@end

+ 0
- 19
lib/ios/ReactNativeNavigationTests/RNNBottomTabOptionsTest.m View File

@@ -1,19 +0,0 @@
1
-#import <XCTest/XCTest.h>
2
-#import "RNNBottomTabOptions.h"
3
-
4
-@interface RNNBottomTabOptionsTest : XCTestCase
5
-
6
-@property (nonatomic, retain) RNNBottomTabOptions* uut;
7
-
8
-@end
9
-
10
-@implementation RNNBottomTabOptionsTest
11
-
12
-- (void)setUp {
13
-    [super setUp];
14
-//	self.uut = [[RNNBottomTabOptions alloc] initEmptyOptions];
15
-}
16
-
17
-
18
-
19
-@end

+ 1
- 1
package.json View File

@@ -166,4 +166,4 @@
166 166
       }
167 167
     }
168 168
   }
169
-}
169
+}