Skip to content

Commit 7a2d7fe

Browse files
committed
Remove XCTContext
1 parent 74ecdb5 commit 7a2d7fe

File tree

1 file changed

+27
-31
lines changed

1 file changed

+27
-31
lines changed

Tests/FatalErrorTestValueImplementationMacroTests/UtilityTests.swift

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,48 +6,44 @@ import _SwiftSyntaxTestSupport
66

77
final class UtilityTests: XCTestCase {
88
func testParameterClauseReturnsEmptyStringForClosureWithoutArguments() throws {
9-
try XCTContext.runActivity(named: "no argument") { _ in
10-
let functionType = try VariableDeclSyntax("var foo: () -> ()") {}
11-
.bindings.first!.closure!
9+
let functionType = try VariableDeclSyntax("var foo: () -> ()") {}
10+
.bindings.first!.closure!
1211

13-
let parameterClause = parameterClause(functionType)
12+
let parameterClause = parameterClause(functionType)
1413

15-
assertStringsEqualWithDiff(
16-
parameterClause.formatted().description,
14+
assertStringsEqualWithDiff(
15+
parameterClause.formatted().description,
1716
"""
1817
"""
19-
)
20-
}
18+
)
2119
}
2220

23-
func testParameterClauseReturnsWildcard() throws {
24-
try XCTContext.runActivity(named: "one argument") { _ in
25-
let functionType = try VariableDeclSyntax("var foo: (Int) -> ()") {}
26-
.bindings.first!.closure!
21+
func testParameterClauseWithOneArgumentReturnsWildcard() throws {
22+
let functionType = try VariableDeclSyntax("var foo: (Int) -> ()") {}
23+
.bindings.first!.closure!
2724

28-
let parameterClause = parameterClause(functionType)
25+
let parameterClause = parameterClause(functionType)
2926

30-
assertStringsEqualWithDiff(
31-
parameterClause.formatted().description,
32-
"""
33-
_
34-
"""
35-
)
36-
}
27+
assertStringsEqualWithDiff(
28+
parameterClause.formatted().description,
29+
"""
30+
_
31+
"""
32+
)
33+
}
3734

38-
try XCTContext.runActivity(named: "two arguments") { _ in
39-
let functionType = try VariableDeclSyntax("var n: (Int, String) -> ()") {}
40-
.bindings.first!.closure!
35+
func testParameterClauseWithTwoArgumentsReturnsWildcard() throws {
36+
let functionType = try VariableDeclSyntax("var n: (Int, String) -> ()") {}
37+
.bindings.first!.closure!
4138

42-
let parameterClause = parameterClause(functionType)
39+
let parameterClause = parameterClause(functionType)
4340

44-
assertStringsEqualWithDiff(
45-
parameterClause.formatted().description,
46-
"""
47-
_, _
48-
"""
49-
)
50-
}
41+
assertStringsEqualWithDiff(
42+
parameterClause.formatted().description,
43+
"""
44+
_, _
45+
"""
46+
)
5147
}
5248

5349
func testPropertyNameRetrievalFromVariableDecl() throws {

0 commit comments

Comments
 (0)