Skip to content

Commit

Permalink
add tests; stub method signature
Browse files Browse the repository at this point in the history
  • Loading branch information
kiel-apple committed Aug 13, 2024
1 parent a8be0aa commit b4b3a7b
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRXPCService.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
NS_ASSUME_NONNULL_BEGIN

@interface MTRXPCService : NSObject<MTRXPCServiceProtocol>

- (void)ping;
@end

NS_ASSUME_NONNULL_END
46 changes: 46 additions & 0 deletions src/darwin/Framework/CHIPTests/MTRXPCServiceTests.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
//
/**
* Copyright (c) 2023 Project CHIP Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#import <XCTest/XCTest.h>

@interface MTRXPCServiceTests<NSXPCListenerDelegate> : XCTestCase

@end

@implementation MTRXPCServiceTests

- (void)setUp {
// Put setup code here. This method is called before the invocation of each test method in the class.
}

- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}

- (void)testExample {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}

- (void)testPerformanceExample {
// This is an example of a performance test case.
[self measureBlock:^{
// Put the code you want to measure the time of here.
}];
}

@end
15 changes: 10 additions & 5 deletions src/darwin/Framework/Matter.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,9 @@
99C65E10267282F1003402F6 /* MTRControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 99C65E0F267282F1003402F6 /* MTRControllerTests.m */; };
99D466E12798936D0089A18F /* MTRCommissioningParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 99D466E02798936D0089A18F /* MTRCommissioningParameters.h */; settings = {ATTRIBUTES = (Public, ); }; };
9BC064942C6BCB6F00996FEF /* MTRXPCService.h in Headers */ = {isa = PBXBuildFile; fileRef = 9BC064922C6BCB6F00996FEF /* MTRXPCService.h */; };
9BC064952C6BCB6F00996FEF /* MTRXPCService.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC064932C6BCB6F00996FEF /* MTRXPCService.m */; };
9BC064952C6BCB6F00996FEF /* MTRXPCService.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9BC064932C6BCB6F00996FEF /* MTRXPCService.mm */; };
9BC064972C6BCBAE00996FEF /* MTRXPCServiceProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 9BC064962C6BCBAE00996FEF /* MTRXPCServiceProtocol.h */; };
9BC064992C6BCEA000996FEF /* MTRXPCServiceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC064982C6BCEA000996FEF /* MTRXPCServiceTests.m */; };
9BDA2A062C5D9AF800A32BDD /* MTRDevice_Concrete.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9BDA2A052C5D9AF800A32BDD /* MTRDevice_Concrete.mm */; };
9BDA2A082C5D9AFB00A32BDD /* MTRDevice_Concrete.h in Headers */ = {isa = PBXBuildFile; fileRef = 9BDA2A072C5D9AFB00A32BDD /* MTRDevice_Concrete.h */; };
AF1CB86E2874B03B00865A96 /* MTROTAProviderDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = AF1CB86D2874B03B00865A96 /* MTROTAProviderDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -735,8 +736,9 @@
99C65E0F267282F1003402F6 /* MTRControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MTRControllerTests.m; sourceTree = "<group>"; };
99D466E02798936D0089A18F /* MTRCommissioningParameters.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRCommissioningParameters.h; sourceTree = "<group>"; };
9BC064922C6BCB6F00996FEF /* MTRXPCService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRXPCService.h; sourceTree = "<group>"; };
9BC064932C6BCB6F00996FEF /* MTRXPCService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MTRXPCService.m; sourceTree = "<group>"; };
9BC064932C6BCB6F00996FEF /* MTRXPCService.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRXPCService.mm; sourceTree = "<group>"; };
9BC064962C6BCBAE00996FEF /* MTRXPCServiceProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRXPCServiceProtocol.h; sourceTree = "<group>"; };
9BC064982C6BCEA000996FEF /* MTRXPCServiceTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MTRXPCServiceTests.m; sourceTree = "<group>"; };
9BDA2A052C5D9AF800A32BDD /* MTRDevice_Concrete.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDevice_Concrete.mm; sourceTree = "<group>"; };
9BDA2A072C5D9AFB00A32BDD /* MTRDevice_Concrete.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDevice_Concrete.h; sourceTree = "<group>"; };
AF1CB86D2874B03B00865A96 /* MTROTAProviderDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTROTAProviderDelegate.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1313,7 +1315,7 @@
7596A84328762729004DAE0E /* MTRDevice.mm */,
9BC064962C6BCBAE00996FEF /* MTRXPCServiceProtocol.h */,
9BC064922C6BCB6F00996FEF /* MTRXPCService.h */,
9BC064932C6BCB6F00996FEF /* MTRXPCService.m */,
9BC064932C6BCB6F00996FEF /* MTRXPCService.mm */,
9BDA2A072C5D9AFB00A32BDD /* MTRDevice_Concrete.h */,
9BDA2A052C5D9AF800A32BDD /* MTRDevice_Concrete.mm */,
88EBF8CB27FABDD500686BC1 /* MTRDeviceAttestationDelegate.h */,
Expand Down Expand Up @@ -1448,6 +1450,7 @@
5A7947DD27BEC3F500434CF2 /* MTRXPCListenerSampleTests.m */,
5A6FEC9C27B5E48800F25F42 /* MTRXPCProtocolTests.m */,
51189FC72A33ACE900184508 /* TestHelpers */,
9BC064982C6BCEA000996FEF /* MTRXPCServiceTests.m */,
);
path = CHIPTests;
sourceTree = "<group>";
Expand Down Expand Up @@ -2006,7 +2009,7 @@
5A7947E427C0129600434CF2 /* MTRDeviceController+XPC.mm in Sources */,
5A6FEC9027B563D900F25F42 /* MTRDeviceControllerOverXPC.mm in Sources */,
516415FC2B6ACA8300D5CE11 /* MTRServerAccessControl.mm in Sources */,
9BC064952C6BCB6F00996FEF /* MTRXPCService.m in Sources */,
9BC064952C6BCB6F00996FEF /* MTRXPCService.mm in Sources */,
B289D4222639C0D300D4E314 /* MTROnboardingPayloadParser.mm in Sources */,
3CF134AD289D8E570017A19E /* MTRDeviceAttestationInfo.mm in Sources */,
2C1B027A2641DB4E00780EF1 /* MTROperationalCredentialsDelegate.mm in Sources */,
Expand Down Expand Up @@ -2076,6 +2079,7 @@
5165A4B32C5AB978002B9799 /* MTRClusterNamesTests.m in Sources */,
51E95DF82A78110900A434F0 /* MTRPerControllerStorageTests.m in Sources */,
51D9CB0B2BA37DCE0049D6DB /* MTRDSTOffsetTests.m in Sources */,
9BC064992C6BCEA000996FEF /* MTRXPCServiceTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -2397,6 +2401,7 @@
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = N42PSN93C7;
"HEADER_SEARCH_PATHS[arch=*]" = "$(PROJECT_DIR)/../../../src";
INFOPLIST_FILE = CHIPTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -2566,7 +2571,7 @@
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = N42PSN93C7;
"HEADER_SEARCH_PATHS[arch=*]" = "$(PROJECT_DIR)/../../../src";
INFOPLIST_FILE = CHIPTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down

0 comments on commit b4b3a7b

Please sign in to comment.