Skip to content

Commit 14f8289

Browse files
committed
Add LinuxMain.swift files to fixtures
1 parent 336ad97 commit 14f8289

File tree

8 files changed

+31
-22
lines changed

8 files changed

+31
-22
lines changed

Fixtures/InvalidLayouts/DirectTestsWithModules1/Tests/FooTests.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ class FooTests: XCTestCase {
77
}
88
}
99

10-
#if os(Linux)
11-
extension FooTests: XCTestCaseProvider {
12-
var allTests: [(String, () throws -> Void)] {
10+
extension FooTests {
11+
static var allTests: [(String, FooTests -> () throws -> Void)] {
1312
return [
1413
("testSuccess", testSuccess),
1514
]
1615
}
1716
}
18-
#endif
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import XCTest
2+
3+
@testable import ModuleAtest
4+
5+
XCTMain([
6+
testCase(BarTests.allTests)
7+
])

Fixtures/InvalidLayouts/DirectTestsWithModules1/Tests/ModuleA/ModuleATests.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ class BarTests: XCTestCase {
77
}
88
}
99

10-
#if os(Linux)
11-
extension BarTests: XCTestCaseProvider {
12-
var allTests: [(String, () throws -> Void)] {
10+
extension BarTests {
11+
static var allTests: [(String, BarTests -> () throws -> Void)] {
1312
return [
1413
("testSuccess", testSuccess),
1514
]
1615
}
1716
}
18-
#endif
19-

Fixtures/InvalidLayouts/DirectTestsWithModules2/Tests/DirectTestsWithModules2/BarTests.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ class BarTests: XCTestCase {
77
}
88
}
99

10-
#if os(Linux)
11-
extension BarTests: XCTestCaseProvider {
12-
var allTests: [(String, () throws -> Void)] {
10+
extension BarTests {
11+
static var allTests: [(String, BarTests -> () throws -> Void)] {
1312
return [
1413
("testSuccess", testSuccess),
1514
]
1615
}
1716
}
18-
#endif
19-

Fixtures/InvalidLayouts/DirectTestsWithModules2/Tests/FooTests.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ class FooTests: XCTestCase {
55
}
66
}
77

8-
#if os(Linux)
9-
extension FooTests: XCTestCaseProvider {
10-
var allTests: [(String, () throws -> Void)] {
8+
extension FooTests {
9+
static var allTests: [(String, FooTests -> () throws -> Void)] {
1110
return [
1211
("testSuccess", testSuccess),
1312
]
1413
}
1514
}
16-
#endif
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import XCTest
2+
3+
@testable import DirectTestsWithModules2test
4+
5+
XCTMain([
6+
testCase(BarTests.allTests)
7+
])

Fixtures/ValidLayouts/SingleModule/DirectTests/Tests/FooTests.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ class FooTests: XCTestCase {
55
}
66
}
77

8-
#if os(Linux)
9-
extension FooTests: XCTestCaseProvider {
10-
var allTests: [(String, () throws -> Void)] {
8+
extension FooTests {
9+
static var allTests: [(String, FooTests -> () throws -> Void)] {
1110
return [
1211
("testSuccess", testSuccess),
1312
]
1413
}
1514
}
16-
#endif
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import XCTest
2+
3+
@testable import DirectTeststest
4+
5+
XCTMain([
6+
testCase(FooTests.allTests)
7+
])

0 commit comments

Comments
 (0)