Skip to content

Commit 813721e

Browse files
committed
Add debug messages to the delegate callbacks for test033_TestMTRDeviceDeviceConfigurationChanged
1 parent d404400 commit 813721e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/darwin/Framework/CHIPTests/MTRDeviceTests.m

+8
Original file line numberDiff line numberDiff line change
@@ -3283,6 +3283,7 @@ - (void)checkAttributeReportTriggersConfigurationChanged:(MTRAttributeIDType)att
32833283

32843284
// Check if the received attribute report matches the injected attribute report.
32853285
delegate.onAttributeDataReceived = ^(NSArray<NSDictionary<NSString *, id> *> * attributeReport) {
3286+
NSLog(@"checkAttributeReportTriggersConfigurationChanged: onAttributeDataReceived called");
32863287
attributeReportsReceived += attributeReport.count;
32873288
XCTAssert(attributeReportsReceived > 0, @"%@", description);
32883289
for (NSDictionary<NSString *, id> * attributeDict in attributeReport) {
@@ -3309,12 +3310,14 @@ - (void)checkAttributeReportTriggersConfigurationChanged:(MTRAttributeIDType)att
33093310
};
33103311

33113312
delegate.onReportEnd = ^() {
3313+
NSLog(@"checkAttributeReportTriggersConfigurationChanged: onReportEnd called");
33123314
[gotAttributeReportEndExpectation fulfill];
33133315
};
33143316

33153317
__block BOOL wasOnDeviceConfigurationChangedCallbackCalled = NO;
33163318

33173319
delegate.onDeviceConfigurationChanged = ^() {
3320+
NSLog(@"checkAttributeReportTriggersConfigurationChanged: onDeviceConfigurationChanged called");
33183321
[deviceConfigurationChangedExpectation fulfill];
33193322
wasOnDeviceConfigurationChangedCallbackCalled = YES;
33203323
};
@@ -3365,6 +3368,7 @@ - (void)test033_TestMTRDeviceDeviceConfigurationChanged
33653368
__block NSNumber * endpointForPowerSourceConfigurationSources;
33663369

33673370
delegate.onAttributeDataReceived = ^(NSArray<NSDictionary<NSString *, id> *> * attributeReport) {
3371+
NSLog(@"test033_TestMTRDeviceDeviceConfigurationChanged: onAttributeDataReceived called");
33683372
attributeReportsReceived += attributeReport.count;
33693373
XCTAssert(attributeReportsReceived > 0);
33703374

@@ -3423,6 +3427,7 @@ - (void)test033_TestMTRDeviceDeviceConfigurationChanged
34233427
};
34243428

34253429
delegate.onReportEnd = ^() {
3430+
NSLog(@"test033_TestMTRDeviceDeviceConfigurationChanged: onReportEnd called");
34263431
XCTAssertNotNil(dataVersionForDescriptor);
34273432
XCTAssertNotNil(dataVersionForOvenCavityOperationalState);
34283433
XCTAssertNotNil(dataVersionForIdentify);
@@ -3660,16 +3665,19 @@ - (void)test033_TestMTRDeviceDeviceConfigurationChanged
36603665
XCTestExpectation * gotAttributeReportWithMultipleAttributesEndExpectation = [self expectationWithDescription:@"Attribute report with multiple attributes has ended"];
36613666
XCTestExpectation * deviceConfigurationChangedExpectationForAttributeReportWithMultipleAttributes = [self expectationWithDescription:@"Device configuration changed was receieved due to an attribute report with multiple attributes "];
36623667
delegate.onAttributeDataReceived = ^(NSArray<NSDictionary<NSString *, id> *> * attributeReport) {
3668+
NSLog(@"test033_TestMTRDeviceDeviceConfigurationChanged: onAttributeDataReceived called with multiple attributes");
36633669
attributeReportsReceived += attributeReport.count;
36643670
XCTAssert(attributeReportsReceived > 0);
36653671
[gotAttributeReportWithMultipleAttributesExpectation fulfill];
36663672
};
36673673

36683674
delegate.onReportEnd = ^() {
3675+
NSLog(@"test033_TestMTRDeviceDeviceConfigurationChanged: onReportEnd called with multiple attributes");
36693676
[gotAttributeReportWithMultipleAttributesEndExpectation fulfill];
36703677
};
36713678

36723679
delegate.onDeviceConfigurationChanged = ^() {
3680+
NSLog(@"test033_TestMTRDeviceDeviceConfigurationChanged: onDeviceConfigurationChanged called for testing with multiple attributes");
36733681
[deviceConfigurationChangedExpectationForAttributeReportWithMultipleAttributes fulfill];
36743682
};
36753683

0 commit comments

Comments
 (0)