File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ BOOL MTRInvokeResponseIsWellFormed(NSArray<MTRDeviceResponseValueDictionary> * r
207
207
208
208
// Now we know data is a dictionary (in fact a data-value). The only thing
209
209
// we promise about it is that it has type MTRStructureValueType.
210
- if (data[MTRTypeKey] != MTRStructureValueType ) {
210
+ if (![MTRStructureValueType isEqual: data[MTRTypeKey]] ) {
211
211
MTR_LOG_ERROR (" Invoke response data is not of structure type: %@" , data);
212
212
return NO ;
213
213
}
Original file line number Diff line number Diff line change @@ -5580,6 +5580,19 @@ - (void)test044_InvokeResponseWellFormedness
5580
5580
],
5581
5581
@"valid" : @(YES),
5582
5582
},
5583
+ @{
5584
+ @"input" : @[
5585
+ @{
5586
+ @"commandPath" : [MTRCommandPath commandPathWithEndpointID:@(0) clusterID:@(6) commandID:@(0)],
5587
+ @"data" : @ {
5588
+ @"type" : @"Structure",
5589
+ @"value" : @[], // Empty structure, valid
5590
+ },
5591
+ },
5592
+ ],
5593
+ // Same as the previous test, but not using the SDK string constants
5594
+ @"valid" : @(YES),
5595
+ },
5583
5596
@{
5584
5597
@"input" : @[
5585
5598
@{
You can’t perform that action at this time.
0 commit comments