@@ -2222,7 +2222,6 @@ - (MTRDevice *)getMTRDevice:(NSNumber *)deviceID
2222
2222
2223
2223
[endpoints addObjectsFromArray: [device arrayOfNumbersFromAttributeValue: [device _dataValueWithoutDataVersion: partsList]]];
2224
2224
return endpoints;
2225
-
2226
2225
}
2227
2226
2228
2227
- (void )test011_testDataStorageUpdatesWhenRemovingEndpoints
@@ -2265,7 +2264,7 @@ - (void)test011_testDataStorageUpdatesWhenRemovingEndpoints
2265
2264
}
2266
2265
};
2267
2266
2268
- __block NSMutableDictionary <NSNumber * , NSArray <NSNumber *> *> * initialClusterIndex = [[NSMutableDictionary alloc ] init ];
2267
+ __block NSMutableDictionary <NSNumber *, NSArray <NSNumber *> *> * initialClusterIndex = [[NSMutableDictionary alloc ] init ];
2269
2268
__block NSMutableArray * testEndpoints;
2270
2269
2271
2270
delegate.onReportEnd = ^{
@@ -2279,8 +2278,7 @@ - (void)test011_testDataStorageUpdatesWhenRemovingEndpoints
2279
2278
dispatch_sync (self->_storageQueue , ^{
2280
2279
XCTAssertTrue ([[controller.controllerDataStore _fetchEndpointIndexForNodeID: deviceID] isEqualToArray: testEndpoints]);
2281
2280
// Populate the initialClusterIndex to use as a reference for all cluster paths later.
2282
- for (NSNumber * endpoint in testEndpoints)
2283
- {
2281
+ for (NSNumber * endpoint in testEndpoints) {
2284
2282
[initialClusterIndex setObject: [controller.controllerDataStore _fetchClusterIndexForNodeID: deviceID endpointID: endpoint] forKey: endpoint];
2285
2283
}
2286
2284
XCTAssertNotNil (initialClusterIndex);
@@ -2485,12 +2483,9 @@ - (void)test012_testDataStorageUpdatesWhenRemovingClusters
2485
2483
dispatch_sync (self->_storageQueue , ^{
2486
2484
XCTAssertFalse ([[controller.controllerDataStore _fetchClusterIndexForNodeID: deviceID endpointID: testEndpoint] containsObject: toBeDeletedCluster]);
2487
2485
for (NSNumber * cluster in initialClusterIndex) {
2488
- if ([cluster isEqualToNumber: toBeDeletedCluster])
2489
- {
2486
+ if ([cluster isEqualToNumber: toBeDeletedCluster]) {
2490
2487
XCTAssertNil ([controller.controllerDataStore _fetchClusterDataForNodeID: deviceID endpointID: testEndpoint clusterID: cluster]);
2491
- }
2492
- else
2493
- {
2488
+ } else {
2494
2489
XCTAssertNotNil ([controller.controllerDataStore _fetchClusterDataForNodeID: deviceID endpointID: testEndpoint clusterID: cluster]);
2495
2490
}
2496
2491
}
@@ -2562,7 +2557,6 @@ - (void)test013_testDataStorageUpdatesWhenRemovingAttributes
2562
2557
XCTAssertNotNil (testClusterDataValue);
2563
2558
2564
2559
dispatch_sync (self->_storageQueue , ^{
2565
-
2566
2560
initialClusterIndex = [[controller.controllerDataStore _fetchClusterIndexForNodeID: deviceID endpointID: testEndpoint] mutableCopy ];
2567
2561
XCTAssertNotNil (initialClusterIndex);
2568
2562
@@ -2573,7 +2567,7 @@ - (void)test013_testDataStorageUpdatesWhenRemovingAttributes
2573
2567
// We will be paged in the cluster data from storage to check the above.
2574
2568
MTRClusterPath * path = [MTRClusterPath clusterPathWithEndpointID: testEndpoint clusterID: cluster];
2575
2569
2576
- if ([cluster isEqualToNumber: @(MTRClusterIDTypeIdentifyID)]) {
2570
+ if ([cluster isEqualToNumber: @(MTRClusterIDTypeIdentifyID)]) {
2577
2571
MTRDeviceClusterData * data = [device _getClusterDataForPath: path];
2578
2572
XCTAssertNotNil (data);
2579
2573
XCTAssertNotNil (data.attributes );
@@ -2589,7 +2583,6 @@ - (void)test013_testDataStorageUpdatesWhenRemovingAttributes
2589
2583
}
2590
2584
}
2591
2585
}
2592
-
2593
2586
});
2594
2587
2595
2588
[subscriptionExpectation fulfill ];
@@ -2621,7 +2614,6 @@ - (void)test013_testDataStorageUpdatesWhenRemovingAttributes
2621
2614
};
2622
2615
2623
2616
delegate.onReportEnd = ^{
2624
-
2625
2617
// Make sure that the cluster data in the data storage is populated with cluster data for MTRClusterIDTypeIdentifyID cluster
2626
2618
// and has all attributes except attribute 1 which was deleted.
2627
2619
// We will be paged in the cluster data from storage to check the above.
0 commit comments