Skip to content

Commit

Permalink
Remove some test-only methods from base MTRDeviceController.
Browse files Browse the repository at this point in the history
These are only used with concrete controllers from tests, and are already
implemented by MTRDeviceController_Concrete.
  • Loading branch information
bzbarsky-apple committed Oct 7, 2024
1 parent 55e2a3f commit fa67aa1
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/darwin/Framework/CHIP/MTRDeviceController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -449,18 +449,6 @@ - (void)removeDevice:(MTRDevice *)device
}
}

#ifdef DEBUG
- (NSDictionary<NSNumber *, NSNumber *> *)unitTestGetDeviceAttributeCounts
{
std::lock_guard lock(*self.deviceMapLock);
NSMutableDictionary<NSNumber *, NSNumber *> * deviceAttributeCounts = [NSMutableDictionary dictionary];
for (NSNumber * nodeID in _nodeIDToDeviceMap) {
deviceAttributeCounts[nodeID] = @([[_nodeIDToDeviceMap objectForKey:nodeID] unitTestAttributeCount]);
}
return deviceAttributeCounts;
}
#endif

- (BOOL)setOperationalCertificateIssuer:(nullable id<MTROperationalCertificateIssuer>)operationalCertificateIssuer
queue:(nullable dispatch_queue_t)queue
{
Expand Down Expand Up @@ -691,15 +679,6 @@ - (void)downloadLogFromNodeWithID:(NSNumber *)nodeID
});
}

#ifdef DEBUG
+ (void)forceLocalhostAdvertisingOnly
{
auto interfaceIndex = chip::Inet::InterfaceId::PlatformType(kDNSServiceInterfaceIndexLocalOnly);
auto interfaceId = chip::Inet::InterfaceId(interfaceIndex);
chip::app::DnssdServer::Instance().SetInterfaceId(interfaceId);
}
#endif // DEBUG

#pragma mark - MTRDeviceControllerDelegate management

// Note these are implemented in the base class so that XPC subclass can use it as well
Expand Down

0 comments on commit fa67aa1

Please sign in to comment.