summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorleonid l lokhmatov <YLokhmatov@luxoft.com>2020-06-23 16:04:15 +0300
committerleonid l lokhmatov <YLokhmatov@luxoft.com>2020-06-23 16:04:15 +0300
commit03b49ca45381b39bcaf27a0eac8329f56e45543e (patch)
treeb883defcf038cacf92302cc69dd65f2ebd53d4ac
parent2184b1d09a3119fe572b7cba6a9175de23aae38d (diff)
downloadsdl_ios-03b49ca45381b39bcaf27a0eac8329f56e45543e.tar.gz
sdl-0266 "New vehicle data GearStatus": fix errors and warnings in tests
-rw-r--r--SmartDeviceLink/SDLGearStatus.h2
-rw-r--r--SmartDeviceLink/SDLGearStatus.m2
-rw-r--r--SmartDeviceLink/SmartDeviceLink.h2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTransmissionTypeSpec.m2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetVehicleDataSpec.m42
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m22
6 files changed, 54 insertions, 18 deletions
diff --git a/SmartDeviceLink/SDLGearStatus.h b/SmartDeviceLink/SDLGearStatus.h
index 83eddc9b2..4e02874bc 100644
--- a/SmartDeviceLink/SDLGearStatus.h
+++ b/SmartDeviceLink/SDLGearStatus.h
@@ -66,4 +66,4 @@ NS_ASSUME_NONNULL_BEGIN
@end
-NS_ASSUME_NONNULL_END \ No newline at end of file
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGearStatus.m b/SmartDeviceLink/SDLGearStatus.m
index b18981663..04ac69436 100644
--- a/SmartDeviceLink/SDLGearStatus.m
+++ b/SmartDeviceLink/SDLGearStatus.m
@@ -77,4 +77,4 @@ NS_ASSUME_NONNULL_BEGIN
@end
-NS_ASSUME_NONNULL_END \ No newline at end of file
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SmartDeviceLink.h b/SmartDeviceLink/SmartDeviceLink.h
index 542c2a208..c94f0c7c1 100644
--- a/SmartDeviceLink/SmartDeviceLink.h
+++ b/SmartDeviceLink/SmartDeviceLink.h
@@ -280,6 +280,8 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
#import "SDLWeatherServiceManifest.h"
#import "SDLWindowCapability.h"
#import "SDLWindowTypeCapabilities.h"
+#import "SDLGearStatus.h"
+#import "SDLTransmissionType.h"
// Enums
#import "SDLAmbientLightStatus.h"
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTransmissionTypeSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTransmissionTypeSpec.m
index 8a887bbc7..508ee495f 100644
--- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTransmissionTypeSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTransmissionTypeSpec.m
@@ -7,7 +7,7 @@
#import <Nimble/Nimble.h>
#import "SDLTransmissionType.h"
-QuickSpecBegin(SDLWindowTypeSpec)
+QuickSpecBegin(SDLTransmissionTypeSpec)
describe(@"Individual Enum Value Tests", ^ {
it(@"Should match internal values", ^ {
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetVehicleDataSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetVehicleDataSpec.m
index 0c17dcc86..d6068c567 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetVehicleDataSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetVehicleDataSpec.m
@@ -40,7 +40,10 @@ describe(@"Getter/Setter Tests", ^ {
testRequest.instantFuelConsumption = @NO;
testRequest.myKey = @YES;
testRequest.odometer = @YES;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
testRequest.prndl = @YES;
+#pragma clang diagnostic pop
testRequest.gearStatus = @YES;
testRequest.rpm = @YES;
testRequest.speed = @NO;
@@ -71,7 +74,10 @@ describe(@"Getter/Setter Tests", ^ {
expect(testRequest.instantFuelConsumption).to(equal(@NO));
expect(testRequest.myKey).to(equal(@YES));
expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(testRequest.prndl).to(equal(@YES));
+#pragma clang diagnostic pop
expect(testRequest.gearStatus).to(equal(@YES));
expect(testRequest.rpm).to(equal(@YES));
expect(testRequest.speed).to(equal(@NO));
@@ -81,7 +87,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testRequest.wiperStatus).to(equal(@NO));
});
- it(@"Should get correctly when initialized", ^ {
+ it(@"Should get correctly when initialized", ^{
NSDictionary<NSString *, id> *dict = @{SDLRPCParameterNameRequest:
@{SDLRPCParameterNameParameters:
@{SDLRPCParameterNameAccelerationPedalPosition:@YES,
@@ -143,7 +149,10 @@ describe(@"Getter/Setter Tests", ^ {
expect(testRequest.instantFuelConsumption).to(equal(@YES));
expect(testRequest.myKey).to(equal(@YES));
expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(testRequest.prndl).to(equal(@YES));
+#pragma clang diagnostic pop
expect(testRequest.gearStatus).to(equal(@YES));
expect(testRequest.rpm).to(equal(@YES));
expect(testRequest.speed).to(equal(@YES));
@@ -180,7 +189,10 @@ describe(@"initializers", ^{
expect(testRequest.instantFuelConsumption).to(beNil());
expect(testRequest.myKey).to(beNil());
expect(testRequest.odometer).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(testRequest.prndl).to(beNil());
+#pragma clang diagnostic pop
expect(testRequest.gearStatus).to(beNil());
expect(testRequest.rpm).to(beNil());
expect(testRequest.speed).to(beNil());
@@ -191,9 +203,10 @@ describe(@"initializers", ^{
});
context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:emergencyEvent:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:wiperStatus:", ^{
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
- SDLGetVehicleData *testRequest = [[SDLGetVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:NO beltStatus:YES bodyInformation:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES emergencyEvent:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES gearStatus:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES vin:YES wiperStatus:YES];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLGetVehicleData *testRequest = [[SDLGetVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:NO beltStatus:YES bodyInformation:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES emergencyEvent:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES vin:YES wiperStatus:YES];
+#pragma clang diagnostic pop
expect(testRequest.accPedalPosition).to(equal(@YES));
expect(testRequest.airbagStatus).to(equal(@NO));
@@ -217,7 +230,10 @@ describe(@"initializers", ^{
expect(testRequest.instantFuelConsumption).to(equal(@YES));
expect(testRequest.myKey).to(equal(@YES));
expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(testRequest.prndl).to(equal(@NO));
+#pragma clang diagnostic pop
expect(testRequest.gearStatus).to(equal(@YES));
expect(testRequest.rpm).to(equal(@YES));
expect(testRequest.speed).to(equal(@YES));
@@ -225,13 +241,13 @@ describe(@"initializers", ^{
expect(testRequest.tirePressure).to(equal(@YES));
expect(testRequest.turnSignal).to(equal(@NO));
expect(testRequest.wiperStatus).to(equal(@YES));
- #pragma clang diagnostic pop
});
context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:wiperStatus:", ^{
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLGetVehicleData *testRequest = [[SDLGetVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES electronicParkBrakeStatus:YES emergencyEvent:YES engineOilLife:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES fuelRange:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES turnSignal:YES vin:YES wiperStatus:YES];
+#pragma clang diagnostic pop
expect(testRequest.accPedalPosition).to(equal(@YES));
expect(testRequest.airbagStatus).to(equal(@YES));
@@ -255,7 +271,10 @@ describe(@"initializers", ^{
expect(testRequest.instantFuelConsumption).to(equal(@YES));
expect(testRequest.myKey).to(equal(@YES));
expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(testRequest.prndl).to(equal(@YES));
+#pragma clang diagnostic pop
expect(testRequest.gearStatus).to(equal(@NO));
expect(testRequest.rpm).to(equal(@YES));
expect(testRequest.speed).to(equal(@YES));
@@ -263,10 +282,12 @@ describe(@"initializers", ^{
expect(testRequest.tirePressure).to(equal(@YES));
expect(testRequest.turnSignal).to(equal(@YES));
expect(testRequest.wiperStatus).to(equal(@YES));
- #pragma clang diagnostic pop
});
context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:cloudAppVehicleID:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:wiperStatus:", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLGetVehicleData *testRequest = [[SDLGetVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES cloudAppVehicleID:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES electronicParkBrakeStatus:YES emergencyEvent:YES engineOilLife:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES fuelRange:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES turnSignal:YES vin:YES wiperStatus:YES];
+#pragma clang diagnostic pop
expect(testRequest.accPedalPosition).to(equal(@YES));
expect(testRequest.airbagStatus).to(equal(@YES));
@@ -290,7 +311,10 @@ describe(@"initializers", ^{
expect(testRequest.instantFuelConsumption).to(equal(@YES));
expect(testRequest.myKey).to(equal(@YES));
expect(testRequest.odometer).to(equal(@YES));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(testRequest.prndl).to(equal(@YES));
+#pragma clang diagnostic pop
expect(testRequest.gearStatus).to(equal(@NO));
expect(testRequest.rpm).to(equal(@YES));
expect(testRequest.speed).to(equal(@YES));
@@ -308,9 +332,7 @@ describe(@"initializers", ^{
expect([testRequest getOEMCustomVehicleData:@"OEMCustomVehicleData"]).to(beFalse());
expect([testRequest getOEMCustomVehicleData:@"OEMCustomVehicleData1"]).to(beTrue());
-
});
-
});
QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m
index 7640f9294..6757517a8 100644
--- a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m
@@ -76,7 +76,6 @@ describe(@"Getter/Setter Tests", ^ {
testResponse.instantFuelConsumption = @40.7;
testResponse.myKey = myKey;
testResponse.odometer = @70000;
- testResponse.prndl = SDLPRNDLPark;
testResponse.gearStatus = gearStatus;
testResponse.rpm = @3;
testResponse.speed = @100;
@@ -85,6 +84,10 @@ describe(@"Getter/Setter Tests", ^ {
testResponse.turnSignal = SDLTurnSignalBoth;
testResponse.vin = vin;
testResponse.wiperStatus = SDLWiperStatusAutomaticHigh;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ testResponse.prndl = SDLPRNDLPark;
+#pragma clang diagnostic pop
expect(testResponse.accPedalPosition).to(equal(@0));
expect(testResponse.airbagStatus).to(equal(airbag));
@@ -108,7 +111,6 @@ describe(@"Getter/Setter Tests", ^ {
expect(testResponse.instantFuelConsumption).to(equal(@40.7));
expect(testResponse.myKey).to(equal(myKey));
expect(testResponse.odometer).to(equal(@70000));
- expect(testResponse.prndl).to(equal(SDLPRNDLPark));
expect(testResponse.gearStatus).to(equal(gearStatus));
expect(testResponse.rpm).to(equal(@3));
expect(testResponse.speed).to(equal(@100));
@@ -117,6 +119,10 @@ describe(@"Getter/Setter Tests", ^ {
expect(testResponse.turnSignal).to(equal(SDLTurnSignalBoth));
expect(testResponse.vin).to(equal(vin));
expect(testResponse.wiperStatus).to(equal(SDLWiperStatusAutomaticHigh));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.prndl).to(equal(SDLPRNDLPark));
+#pragma clang diagnostic pop
});
it(@"Should get correctly when initialized", ^ {
@@ -152,7 +158,7 @@ describe(@"Getter/Setter Tests", ^ {
SDLRPCParameterNameTirePressure:tires,
SDLRPCParameterNameTurnSignal:SDLTurnSignalOff,
SDLRPCParameterNameVIN:vin,
- SDLRPCParameterNameWiperStatus:SDLWiperStatusAutomaticHigh
+ SDLRPCParameterNameWiperStatus:SDLWiperStatusAutomaticHigh,
@"gearStatus":gearStatus
},
SDLRPCParameterNameOperationName:SDLRPCFunctionNameGetVehicleData}};
@@ -183,7 +189,6 @@ describe(@"Getter/Setter Tests", ^ {
expect(testResponse.instantFuelConsumption).to(equal(@40.7));
expect(testResponse.myKey).to(equal(myKey));
expect(testResponse.odometer).to(equal(@70000));
- expect(testResponse.prndl).to(equal(SDLPRNDLPark));
expect(testResponse.gearStatus).to(equal(gearStatus));
expect(testResponse.rpm).to(equal(@3));
expect(testResponse.speed).to(equal(@100));
@@ -192,6 +197,10 @@ describe(@"Getter/Setter Tests", ^ {
expect(testResponse.turnSignal).to(equal(SDLTurnSignalOff));
expect(testResponse.vin).to(equal(vin));
expect(testResponse.wiperStatus).to(equal(SDLWiperStatusAutomaticHigh));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.prndl).to(equal(SDLPRNDLPark));
+#pragma clang diagnostic pop
});
it(@"Should return nil if not set", ^ {
@@ -219,7 +228,6 @@ describe(@"Getter/Setter Tests", ^ {
expect(testResponse.instantFuelConsumption).to(beNil());
expect(testResponse.myKey).to(beNil());
expect(testResponse.odometer).to(beNil());
- expect(testResponse.prndl).to(beNil());
expect(testResponse.gearStatus).to(beNil());
expect(testResponse.rpm).to(beNil());
expect(testResponse.speed).to(beNil());
@@ -228,6 +236,10 @@ describe(@"Getter/Setter Tests", ^ {
expect(testResponse.turnSignal).to(beNil());
expect(testResponse.vin).to(beNil());
expect(testResponse.wiperStatus).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.prndl).to(beNil());
+#pragma clang diagnostic pop
});
it(@"Should set and get Generic Network Signal Data", ^{