Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing unit tests to build for Darwin #38010

Merged
merged 1 commit into from
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ - (BOOL)deleteAllStorage
return [_storage reset];
}

// MARK: CHIPPersistentStorageDelegate
#pragma mark - CHIPPersistentStorageDelegate

- (nullable NSData *)storageDataForKey:(NSString *)key
{
Expand Down
20 changes: 10 additions & 10 deletions src/darwin/Framework/CHIPTests/TestHelpers/MTRMockCB.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ - (instancetype)_initWithMock:(MTRMockCB *)mock;
- (void)_didUpdateState;
- (void)_maybeDiscoverPeripheral:(MTRMockCBPeripheralDetails *)details;

// MARK: CBManager
#pragma mark - CBManager

@property (nonatomic, assign, readonly) CBManagerState state;
@property (nonatomic, assign, readonly) CBManagerAuthorization authorization;
@property (class, nonatomic, assign, readonly) CBManagerAuthorization authorization;

// MARK: CBCentralManager
#pragma mark - CBCentralManager

@property (nonatomic, weak, nullable) id<CBCentralManagerDelegate> delegate;
@property (nonatomic, assign, readonly) BOOL isScanning;
Expand Down Expand Up @@ -82,11 +82,11 @@ - (instancetype)_initWithDetails:(MTRMockCBPeripheralDetails *)details manager:(

@property (readonly, strong, nonatomic) MTRMockCBCentralManager * manager; // not API, but used by BlePlatformDelegateImpl via KVC

// MARK: CBPeer
#pragma mark - CBPeer

@property (readonly, nonatomic) NSUUID * identifier;

// MARK: CBPeripheral
#pragma mark - CBPeripheral

@property (weak, nonatomic, nullable) id<CBPeripheralDelegate> delegate;
@property (retain, readonly, nullable) NSString * name;
Expand Down Expand Up @@ -422,7 +422,7 @@ - (NSString *)description
return result;
}

// MARK: CBManager
#pragma mark - CBManager

+ (CBManagerAuthorization)authorization
{
Expand All @@ -439,7 +439,7 @@ - (CBManagerState)state
return _mock.state;
}

// MARK: CBCentralManager
#pragma mark - CBCentralManager

+ (BOOL)supportsFeatures:(CBCentralManagerFeature)features
{
Expand Down Expand Up @@ -536,7 +536,7 @@ - (void)registerForConnectionEventsWithOptions:(nullable NSDictionary<CBConnecti
{
}

// MARK: Internals
#pragma mark - Internals

- (void)_didUpdateState
{
Expand Down Expand Up @@ -592,11 +592,11 @@ - (NSString *)description
return result;
}

// MARK: CBPeer <NSCopying>
#pragma mark - CBPeer <NSCopying>

- (BOOL)isEqual:(id)object
{
return [object class] == [self class] && [((MTRMockCBPeripheral *) object).identifier isEqualTo:self.identifier];
return [object class] == [self class] && [((MTRMockCBPeripheral *) object).identifier isEqual:self.identifier];
}

- (NSUInteger)hash
Expand All @@ -614,7 +614,7 @@ - (NSUUID *)identifier
return _details.identifier;
}

// MARK: CBPeripheral
#pragma mark - CBPeripheral

- (nullable NSString *)name
{
Expand Down
Loading