summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2021-08-06 11:14:54 -0400
committerJoel Fischer <joeljfischer@gmail.com>2021-08-06 11:14:54 -0400
commitf25932a4ec67cf0c7b0b86164a44dca9f74736cc (patch)
treed21bcd082eac8292ddf08224a7aeb7dd4b4637ad
parent7031f683fe9c90c322d3aaf91919963daefaafba (diff)
downloadsdl_ios-f25932a4ec67cf0c7b0b86164a44dca9f74736cc.tar.gz
Add test for cell equality with subcells empty vs nil
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLMenuCellSpec.m7
1 files changed, 7 insertions, 0 deletions
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuCellSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuCellSpec.m
index f6d982a57..4958e7674 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuCellSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuCellSpec.m
@@ -108,6 +108,13 @@ describe(@"a menu cell", ^{
expect([testCell isEqual:testCell2]).to(beFalse());
});
+ it(@"should compare cells and return false if one cell has subcells empty and another has subcells nil", ^{
+ testCell = [[SDLMenuCell alloc] initWithTitle:someTitle secondaryText:someSecondaryTitle tertiaryText:someTertiaryTitle icon:nil secondaryArtwork:someSecondaryArtwork submenuLayout:testLayout subCells:nil];
+ testCell2 = [[SDLMenuCell alloc] initWithTitle:someTitle secondaryText:someSecondaryTitle tertiaryText:someTertiaryTitle icon:nil secondaryArtwork:someSecondaryArtwork submenuLayout:testLayout subCells:@[]];
+
+ expect([testCell isEqual:testCell2]).to(beFalse());
+ });
+
it(@"should compare cells and return true if cells equal", ^{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"