File tree 1 file changed +5
-1
lines changed
src/darwin/Framework/CHIPTests
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -3085,7 +3085,7 @@ + (void)checkAttributeReportTriggersConfigurationChanged:(MTRAttributeIDType)att
3085
3085
deviceConfigurationChangedExpectation.inverted = !expectConfigurationChanged;
3086
3086
3087
3087
__block unsigned attributeReportsReceived = 0;
3088
- __block NSArray<NSDictionary<NSString *, id> *> * testDataValue = nil;
3088
+ __block id testDataValue = nil;
3089
3089
3090
3090
for (NSDictionary<NSString *, id> * attributeDict in attributeReport) {
3091
3091
MTRAttributePath * attributePath = attributeDict[MTRAttributePathKey];
@@ -3111,6 +3111,10 @@ + (void)checkAttributeReportTriggersConfigurationChanged:(MTRAttributeIDType)att
3111
3111
XCTAssertNotNil(data);
3112
3112
XCTAssertEqualObjects(data[MTRDataVersionKey], dataVersion);
3113
3113
3114
+ // This code assumes that none of the attributes in the report can have null values.
3115
+ // Since we are injecting the attribute report for testing this with non-null values,
3116
+ // we are fine for now. But if we plan to inject attribute reports with attributes having
3117
+ // null values, we need to fix the code accordingly.
3114
3118
id dataValue = data[MTRValueKey];
3115
3119
XCTAssertNotNil(dataValue);
3116
3120
XCTAssertNotNil(testDataValue);
You can’t perform that action at this time.
0 commit comments