@@ -2342,7 +2342,6 @@ - (MTRDevice *)getMTRDevice:(NSNumber *)deviceID
2342
2342
2343
2343
[endpoints addObjectsFromArray: [device arrayOfNumbersFromAttributeValue: [device _dataValueWithoutDataVersion: partsList]]];
2344
2344
return endpoints;
2345
-
2346
2345
}
2347
2346
2348
2347
- (void )test011_testDataStorageUpdatesWhenRemovingEndpoints
@@ -2385,7 +2384,7 @@ - (void)test011_testDataStorageUpdatesWhenRemovingEndpoints
2385
2384
}
2386
2385
};
2387
2386
2388
- __block NSMutableDictionary <NSNumber * , NSArray <NSNumber *> *> * initialClusterIndex = [[NSMutableDictionary alloc ] init ];
2387
+ __block NSMutableDictionary <NSNumber *, NSArray <NSNumber *> *> * initialClusterIndex = [[NSMutableDictionary alloc ] init ];
2389
2388
__block NSMutableArray * testEndpoints;
2390
2389
2391
2390
delegate.onReportEnd = ^{
@@ -2399,8 +2398,7 @@ - (void)test011_testDataStorageUpdatesWhenRemovingEndpoints
2399
2398
dispatch_sync (self->_storageQueue , ^{
2400
2399
XCTAssertTrue ([[controller.controllerDataStore _fetchEndpointIndexForNodeID: deviceID] isEqualToArray: testEndpoints]);
2401
2400
// Populate the initialClusterIndex to use as a reference for all cluster paths later.
2402
- for (NSNumber * endpoint in testEndpoints)
2403
- {
2401
+ for (NSNumber * endpoint in testEndpoints) {
2404
2402
[initialClusterIndex setObject: [controller.controllerDataStore _fetchClusterIndexForNodeID: deviceID endpointID: endpoint] forKey: endpoint];
2405
2403
}
2406
2404
XCTAssertNotNil (initialClusterIndex);
@@ -2605,12 +2603,9 @@ - (void)test012_testDataStorageUpdatesWhenRemovingClusters
2605
2603
dispatch_sync (self->_storageQueue , ^{
2606
2604
XCTAssertFalse ([[controller.controllerDataStore _fetchClusterIndexForNodeID: deviceID endpointID: testEndpoint] containsObject: toBeDeletedCluster]);
2607
2605
for (NSNumber * cluster in initialClusterIndex) {
2608
- if ([cluster isEqualToNumber: toBeDeletedCluster])
2609
- {
2606
+ if ([cluster isEqualToNumber: toBeDeletedCluster]) {
2610
2607
XCTAssertNil ([controller.controllerDataStore _fetchClusterDataForNodeID: deviceID endpointID: testEndpoint clusterID: cluster]);
2611
- }
2612
- else
2613
- {
2608
+ } else {
2614
2609
XCTAssertNotNil ([controller.controllerDataStore _fetchClusterDataForNodeID: deviceID endpointID: testEndpoint clusterID: cluster]);
2615
2610
}
2616
2611
}
@@ -2682,7 +2677,6 @@ - (void)test013_testDataStorageUpdatesWhenRemovingAttributes
2682
2677
XCTAssertNotNil (testClusterDataValue);
2683
2678
2684
2679
dispatch_sync (self->_storageQueue , ^{
2685
-
2686
2680
initialClusterIndex = [[controller.controllerDataStore _fetchClusterIndexForNodeID: deviceID endpointID: testEndpoint] mutableCopy ];
2687
2681
XCTAssertNotNil (initialClusterIndex);
2688
2682
@@ -2693,7 +2687,7 @@ - (void)test013_testDataStorageUpdatesWhenRemovingAttributes
2693
2687
// We will be paged in the cluster data from storage to check the above.
2694
2688
MTRClusterPath * path = [MTRClusterPath clusterPathWithEndpointID: testEndpoint clusterID: cluster];
2695
2689
2696
- if ([cluster isEqualToNumber: @(MTRClusterIDTypeIdentifyID)]) {
2690
+ if ([cluster isEqualToNumber: @(MTRClusterIDTypeIdentifyID)]) {
2697
2691
MTRDeviceClusterData * data = [device _getClusterDataForPath: path];
2698
2692
XCTAssertNotNil (data);
2699
2693
XCTAssertNotNil (data.attributes );
@@ -2709,7 +2703,6 @@ - (void)test013_testDataStorageUpdatesWhenRemovingAttributes
2709
2703
}
2710
2704
}
2711
2705
}
2712
-
2713
2706
});
2714
2707
2715
2708
[subscriptionExpectation fulfill ];
@@ -2741,7 +2734,6 @@ - (void)test013_testDataStorageUpdatesWhenRemovingAttributes
2741
2734
};
2742
2735
2743
2736
delegate.onReportEnd = ^{
2744
-
2745
2737
// Make sure that the cluster data in the data storage is populated with cluster data for MTRClusterIDTypeIdentifyID cluster
2746
2738
// and has all attributes except attribute 1 which was deleted.
2747
2739
// We will be paged in the cluster data from storage to check the above.
0 commit comments