summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2016-11-04 13:10:10 -0400
committerJoel Fischer <joeljfischer@gmail.com>2016-11-04 13:10:10 -0400
commitd9d5ea5acc4d9213bda235e896941dac3a1210fd (patch)
treef3d0e8a88d50eba8e5a0b1b335e5547b68c3de9d
parente12c5c936aebecf9e40c32fd7487885146821bea (diff)
parent76f5de67fd73b82f4396a84bb0dda8863e8429b3 (diff)
downloadsdl_ios-d9d5ea5acc4d9213bda235e896941dac3a1210fd.tar.gz
Merge branch 'feature/issue_455_generic_display_type' into release/4.4.0
-rw-r--r--SmartDeviceLink/SDLDisplayType.h2
-rw-r--r--SmartDeviceLink/SDLDisplayType.m9
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLDisplayTypeSpec.m10
3 files changed, 16 insertions, 5 deletions
diff --git a/SmartDeviceLink/SDLDisplayType.h b/SmartDeviceLink/SDLDisplayType.h
index 3bb2f2b9a..a25590ecb 100644
--- a/SmartDeviceLink/SDLDisplayType.h
+++ b/SmartDeviceLink/SDLDisplayType.h
@@ -58,4 +58,6 @@
+ (SDLDisplayType *)GEN3_8_INCH;
++ (SDLDisplayType *)GENERIC;
+
@end
diff --git a/SmartDeviceLink/SDLDisplayType.m b/SmartDeviceLink/SDLDisplayType.m
index 8059aa54b..0c44413c0 100644
--- a/SmartDeviceLink/SDLDisplayType.m
+++ b/SmartDeviceLink/SDLDisplayType.m
@@ -14,6 +14,7 @@ SDLDisplayType *SDLDisplayType_MFD3 = nil;
SDLDisplayType *SDLDisplayType_MFD4 = nil;
SDLDisplayType *SDLDisplayType_MFD5 = nil;
SDLDisplayType *SDLDisplayType_GEN3_8_INCH = nil;
+SDLDisplayType *SDLDisplayType_GENERIC = nil;
NSArray *SDLDisplayType_values = nil;
@@ -41,6 +42,7 @@ NSArray *SDLDisplayType_values = nil;
SDLDisplayType.MFD4,
SDLDisplayType.MFD5,
SDLDisplayType.GEN3_8_INCH,
+ SDLDisplayType.GENERIC
];
}
return SDLDisplayType_values;
@@ -116,4 +118,11 @@ NSArray *SDLDisplayType_values = nil;
return SDLDisplayType_GEN3_8_INCH;
}
++ (SDLDisplayType *)GENERIC {
+ if (SDLDisplayType_GENERIC == nil) {
+ SDLDisplayType_GENERIC = [[SDLDisplayType alloc] initWithValue:@"SDL_GENERIC"];
+ }
+ return SDLDisplayType_GENERIC;
+}
+
@end
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLDisplayTypeSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLDisplayTypeSpec.m
index 964736fbc..eaa44c2d3 100644
--- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLDisplayTypeSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLDisplayTypeSpec.m
@@ -23,8 +23,8 @@ describe(@"Individual Enum Value Tests", ^ {
expect([SDLDisplayType MFD3].value).to(equal(@"MFD3"));
expect([SDLDisplayType MFD4].value).to(equal(@"MFD4"));
expect([SDLDisplayType MFD5].value).to(equal(@"MFD5"));
- //NOT DEFINED IN SPEC
expect([SDLDisplayType GEN3_8_INCH].value).to(equal(@"GEN3_8-INCH"));
+ expect([SDLDisplayType GENERIC].value).to(equal(@"SDL_GENERIC"));
});
});
describe(@"ValueOf Tests", ^ {
@@ -38,8 +38,8 @@ describe(@"ValueOf Tests", ^ {
expect([SDLDisplayType valueOf:@"MFD3"]).to(equal([SDLDisplayType MFD3]));
expect([SDLDisplayType valueOf:@"MFD4"]).to(equal([SDLDisplayType MFD4]));
expect([SDLDisplayType valueOf:@"MFD5"]).to(equal([SDLDisplayType MFD5]));
- //NOT DEFINED IN SPEC
expect([SDLDisplayType valueOf:@"GEN3_8-INCH"]).to(equal([SDLDisplayType GEN3_8_INCH]));
+ expect([SDLDisplayType valueOf:@"SDL_GENERIC"]).to(equal([SDLDisplayType GENERIC]));
});
it(@"Should return nil when invalid", ^ {
@@ -60,8 +60,8 @@ describe(@"Value List Tests", ^ {
[SDLDisplayType MFD3],
[SDLDisplayType MFD4],
[SDLDisplayType MFD5],
- //NOT DEFINED IN SPEC
- [SDLDisplayType GEN3_8_INCH]] copy];
+ [SDLDisplayType GEN3_8_INCH],
+ [SDLDisplayType GENERIC]] copy];
});
it(@"Should contain all defined enum values", ^ {
@@ -77,4 +77,4 @@ describe(@"Value List Tests", ^ {
});
});
-QuickSpecEnd \ No newline at end of file
+QuickSpecEnd