Skip to content

Commit ff44e71

Browse files
committed
Addressed comments
1 parent 6428c58 commit ff44e71

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/darwin/Framework/CHIPTests/MTRDeviceTests.m

+5-1
Original file line numberDiff line numberDiff line change
@@ -3085,7 +3085,7 @@ + (void)checkAttributeReportTriggersConfigurationChanged:(MTRAttributeIDType)att
30853085
deviceConfigurationChangedExpectation.inverted = !expectConfigurationChanged;
30863086

30873087
__block unsigned attributeReportsReceived = 0;
3088-
__block NSArray<NSDictionary<NSString *, id> *> * testDataValue = nil;
3088+
__block id testDataValue = nil;
30893089

30903090
for (NSDictionary<NSString *, id> * attributeDict in attributeReport) {
30913091
MTRAttributePath * attributePath = attributeDict[MTRAttributePathKey];
@@ -3111,6 +3111,10 @@ + (void)checkAttributeReportTriggersConfigurationChanged:(MTRAttributeIDType)att
31113111
XCTAssertNotNil(data);
31123112
XCTAssertEqualObjects(data[MTRDataVersionKey], dataVersion);
31133113

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.
31143118
id dataValue = data[MTRValueKey];
31153119
XCTAssertNotNil(dataValue);
31163120
XCTAssertNotNil(testDataValue);

0 commit comments

Comments
 (0)