Skip to content

Commit 61bfcab

Browse files
committed
Add test plans
1 parent dd6bbf9 commit 61bfcab

File tree

4 files changed

+55
-5
lines changed

4 files changed

+55
-5
lines changed

URLPatternExample/URLPatternExample.xcodeproj/project.pbxproj

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,22 @@
3030
EF43E6292D9ED86100809F76 /* URLPatternExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = URLPatternExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3131
/* End PBXFileReference section */
3232

33+
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
34+
EF43E7932DA01E9D00809F76 /* Exceptions for "URLPatternExample" folder in "URLPatternExample" target */ = {
35+
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
36+
membershipExceptions = (
37+
URLPatternExample.xctestplan,
38+
);
39+
target = EF43E6182D9ED86000809F76 /* URLPatternExample */;
40+
};
41+
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
42+
3343
/* Begin PBXFileSystemSynchronizedRootGroup section */
3444
EF43E61B2D9ED86000809F76 /* URLPatternExample */ = {
3545
isa = PBXFileSystemSynchronizedRootGroup;
46+
exceptions = (
47+
EF43E7932DA01E9D00809F76 /* Exceptions for "URLPatternExample" folder in "URLPatternExample" target */,
48+
);
3649
path = URLPatternExample;
3750
sourceTree = "<group>";
3851
};

URLPatternExample/URLPatternExample.xcodeproj/xcshareddata/xcschemes/URLPatternExample.xcscheme

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@
2727
buildConfiguration = "Debug"
2828
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2929
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
30-
shouldUseLaunchSchemeArgsEnv = "YES"
31-
shouldAutocreateTestPlan = "YES">
30+
shouldUseLaunchSchemeArgsEnv = "YES">
31+
<TestPlans>
32+
<TestPlanReference
33+
reference = "container:URLPatternExample.xctestplan"
34+
default = "YES">
35+
</TestPlanReference>
36+
</TestPlans>
3237
<Testables>
3338
<TestableReference
3439
skipped = "NO"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"configurations" : [
3+
{
4+
"id" : "3D517E72-A992-452A-A09A-B1D7280F126B",
5+
"name" : "Test Scheme Action",
6+
"options" : {
7+
8+
}
9+
}
10+
],
11+
"defaultOptions" : {
12+
"targetForVariableExpansion" : {
13+
"containerPath" : "container:URLPatternExample.xcodeproj",
14+
"identifier" : "EF43E6182D9ED86000809F76",
15+
"name" : "URLPatternExample"
16+
}
17+
},
18+
"testTargets" : [
19+
{
20+
"parallelizable" : true,
21+
"target" : {
22+
"containerPath" : "container:URLPatternExample.xcodeproj",
23+
"identifier" : "EF43E6282D9ED86100809F76",
24+
"name" : "URLPatternExampleTests"
25+
}
26+
}
27+
],
28+
"version" : 1
29+
}

URLPatternExample/URLPatternExampleTests/URLPatternExampleTests.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ struct URLPatternExampleTests {
227227
#expect(deepLink == .post(postId: value))
228228
}
229229

230-
// MARK: - Unicode Tests
230+
// MARK: - Priority Tests
231231
@URLPattern
232232
enum PriorityTest: Equatable {
233233
@URLPath("/{a}/{b}")
@@ -237,11 +237,13 @@ struct URLPatternExampleTests {
237237
case post(postId: Int)
238238
}
239239

240-
@Test func checkPriorityCases() async throws {
240+
@Test("Test Priority")
241+
func checkPriorityCases() async throws {
241242
let url = try #require(URL(string: "/post/1"))
242243
#expect(PriorityTest(url: url) == .all(a: "post", b: "1"))
243244
}
244245

246+
// MARK: - Scope Tests
245247
@URLPattern
246248
enum ScopeTest {
247249
@URLPath("/")
@@ -277,7 +279,8 @@ struct URLPatternExampleTests {
277279
@URLPath("/{a}/{b}/{c}/{d}/{e}/{f}/{g}/{h}/{i}/{j}")
278280
case ten(a: String, b: String, c: String, d: String, e: String, f: String, g: String, h: String, i: String, j: String)
279281
}
280-
@Test("Test scope", arguments: Array(0...20))
282+
283+
@Test("Test Scope", arguments: Array(0...20))
281284
func checkScope(num: Int) async throws {
282285
let url = try #require(URL(string: "/" + (0..<num).map { String($0) }.joined(separator: "/")))
283286

0 commit comments

Comments
 (0)