Skip to content

Commit

Permalink
Merge pull request #336 from bzbarsky-apple/testing
Browse files Browse the repository at this point in the history
Make Darwin tests build
  • Loading branch information
woody-apple authored Jul 2, 2022
2 parents f361442 + 264996b commit 1519afc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/darwin/Framework/CHIPTests/MTRDeviceTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,7 @@ - (void)test011_ReadCachedAttribute
[self waitForExpectations:[NSArray arrayWithObject:newSubscriptionEstablished] timeout:kTimeoutInSeconds];

__auto_type reportExpectation = [self expectationWithDescription:@"Report handler called"];
__block void (^reportHandler)(NSArray * _Nullable value, NSError * _Nullable error);
reportHandler = ^(NSArray * _Nullable value, NSError * _Nullable error) {
NSLog(@"Report received: %@, error: %@", value, error);
for (MTRAttributeReport * report in value) {
Expand Down
9 changes: 2 additions & 7 deletions src/darwin/Framework/CHIPTests/MTRTestKeys.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#import <Security/SecKey.h>

@interface MTRTestKeys ()
@property (readwrite) SecKeyRef privateKey;
@property (readwrite) SecKeyRef publicKey;
@property (readonly) SecKeyRef privateKey;
@property (readonly) SecKeyRef publicKey;
@end

@implementation MTRTestKeys
Expand Down Expand Up @@ -79,11 +79,6 @@ - (NSData *)signMessageECDSA_DER:(NSData *)message
return (__bridge_transfer NSData *) outData;
}

- (SecKeyRef)publicKey
{
return _publicKey;
}

- (void)dealloc
{
if (_publicKey) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ - (void)testThreadOperationalDataset
channel:25
panID:[NSData dataWithBytes:&panID length:sizeof(panID)]];
XCTAssertNotNil(dataset);
NSData * data = [dataset asData];
NSData * data = [dataset data];
XCTAssertNotNil(data);

MTRThreadOperationalDataset * reconstructed = [[MTRThreadOperationalDataset alloc] initWithData:data];
Expand Down

0 comments on commit 1519afc

Please sign in to comment.