summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2018-11-28 10:23:04 -0500
committerJoel Fischer <joeljfischer@gmail.com>2018-11-28 10:23:04 -0500
commit8dcc7afc89ea269a224d24fd77446340b52b6f57 (patch)
treef3e049ea04c25fc805d1921f125f2bec268a93cc
parent0f3aa408423aded1a3f36c71de4bf179064e62a8 (diff)
downloadsdl_ios-bugfix/issue_1126_softbutton_nil_crash.tar.gz
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLSoftButtonStateSpec.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLSoftButtonStateSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLSoftButtonStateSpec.m
index ffea7c58e..e62a9256f 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLSoftButtonStateSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLSoftButtonStateSpec.m
@@ -60,6 +60,17 @@ describe(@"soft button state", ^{
expect(testSoftButton.image.value).to(equal(testArtworkName));
});
});
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-value"
+ context(@"when created invalid", ^{
+ it(@"should assert", ^{
+ expectAction(^{
+ [[SDLSoftButtonState alloc] initWithStateName:testStateName text:nil image:nil];
+ }).to(raiseException());
+ });
+ });
+#pragma clang diagnostic pop
});
QuickSpecEnd