Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and nivi-apple committed May 1, 2024
1 parent 217cd66 commit e98778c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/darwin/Framework/CHIPTests/MTRDeviceTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -3126,15 +3126,14 @@ + (void)checkAttributeReportTriggersConfigurationChanged:(MTRAttributeIDType)att
__block BOOL wasOnDeviceConfigurationChangedCallbackCalled = NO;

delegate.onDeviceConfigurationChanged = ^() {
[deviceConfigurationChangedExpectation fulfill];
[deviceConfigurationChangedExpectation fulfill];
wasOnDeviceConfigurationChangedCallbackCalled = YES;
};

[device unitTestInjectAttributeReport:attributeReport];

[testcase waitForExpectations:@[ gotAttributeReportExpectation, gotAttributeReportEndExpectation, deviceConfigurationChangedExpectation ] timeout:kTimeoutInSeconds];
if (!expectConfigurationChanged)
{
if (!expectConfigurationChanged) {
XCTAssertFalse(wasOnDeviceConfigurationChangedCallbackCalled);
}
}
Expand Down Expand Up @@ -3416,7 +3415,7 @@ - (void)test033_TestMTRDeviceDeviceConfigurationChanged
}
];

// Test an attribute report with multiple attributes reported
// Test an attribute report with multiple attributes at least one of which triggers device configuration changed.
dataVersionForAttributeList = [NSNumber numberWithUnsignedLongLong:(dataVersionForAttributeList.unsignedLongLongValue + 1)];
dataVersionForFeatureMap = [NSNumber numberWithUnsignedLongLong:(dataVersionForFeatureMap.unsignedLongLongValue + 1)];
dataVersionForPowerConfigurationSources = [NSNumber numberWithUnsignedLongLong:(dataVersionForPowerConfigurationSources.unsignedLongLongValue + 1)];
Expand Down Expand Up @@ -3451,7 +3450,6 @@ - (void)test033_TestMTRDeviceDeviceConfigurationChanged
XCTestExpectation * gotAttributeReportWithMultipleAttributesEndExpectation = [self expectationWithDescription:@"Attribute report with multiple attributes has ended"];
XCTestExpectation * deviceConfigurationChangedExpectationForAttributeReportWithMultipleAttributes = [self expectationWithDescription:@"Device configuration changed was receieved due to an attribute report with multiple attributes "];
delegate.onAttributeDataReceived = ^(NSArray<NSDictionary<NSString *, id> *> * attributeReport) {
NSLog(@"got subscription report %@", attributeReport);
attributeReportsReceived += attributeReport.count;
XCTAssert(attributeReportsReceived > 0);
[gotAttributeReportWithMultipleAttributesExpectation fulfill];
Expand Down

0 comments on commit e98778c

Please sign in to comment.