Skip to content

Commit a2b51d3

Browse files
authored
Delete XCTestManifests.swift (#263)
1 parent 04b028e commit a2b51d3

File tree

5 files changed

+24
-235
lines changed

5 files changed

+24
-235
lines changed

Tests/LinuxMain.swift

-8
This file was deleted.

Tests/XcbeautifyLibTests/ParsingTests/ParsingTests.swift

+8
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ final class ParsingTests: XCTestCase {
3636
// It uses `XCTAssertEqual` instead of `XCTAssertLessThanOrEqual` as a reminder.
3737
// Update this magic number whenever `uncapturedOutput` is less than the current magic number.
3838
// There's a regression whenever `uncapturedOutput` is greater than the current magic number.
39+
#if os(macOS)
3940
XCTAssertEqual(uncapturedOutput, 2006)
41+
#else
42+
XCTAssertEqual(uncapturedOutput, 2022)
43+
#endif
4044
}
4145

4246
func testLargeXcodebuildLog() throws {
@@ -73,6 +77,10 @@ final class ParsingTests: XCTestCase {
7377
// It uses `XCTAssertEqual` instead of `XCTAssertLessThanOrEqual` as a reminder.
7478
// Update this magic number whenever `uncapturedOutput` is less than the current magic number.
7579
// There's a regression whenever `uncapturedOutput` is greater than the current magic number.
80+
#if os(macOS)
7681
XCTAssertEqual(uncapturedOutput, 69575)
82+
#else
83+
XCTAssertEqual(uncapturedOutput, 70143)
84+
#endif
7785
}
7886
}

Tests/XcbeautifyLibTests/RendererTests/GitHubActionsRendererTests.swift

+6
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ final class GitHubActionsRendererTests: XCTestCase {
227227
#endif
228228
}
229229

230+
#if os(macOS)
230231
func testExecutedWithSkipped() {
231232
let input1 = "Test Suite 'All tests' failed at 2022-01-15 21:31:49.073."
232233
let input2 = "Executed 56 tests, with 3 test skipped and 2 failures (1 unexpected) in 1.029 (1.029) seconds"
@@ -268,6 +269,7 @@ final class GitHubActionsRendererTests: XCTestCase {
268269
XCTAssertEqual(parser.summary?.skippedCount, 4)
269270
XCTAssertEqual(parser.summary?.time, 4.029)
270271
}
272+
#endif
271273

272274
func testFailingTest() { }
273275

@@ -517,6 +519,7 @@ final class GitHubActionsRendererTests: XCTestCase {
517519

518520
func testTestSuiteStarted() { }
519521

522+
#if os(macOS)
520523
func testTestSuiteAllTestsPassed() {
521524
let input = "Test Suite 'All tests' passed at 2022-01-15 21:31:49.073."
522525

@@ -526,7 +529,9 @@ final class GitHubActionsRendererTests: XCTestCase {
526529
XCTAssertTrue(parser.needToRecordSummary)
527530
XCTAssertEqual(parser.outputType, .undefined)
528531
}
532+
#endif
529533

534+
#if os(macOS)
530535
func testTestSuiteAllTestsFailed() {
531536
let input = "Test Suite 'All tests' failed at 2022-01-15 21:31:49.073."
532537

@@ -535,6 +540,7 @@ final class GitHubActionsRendererTests: XCTestCase {
535540
XCTAssertNil(formatted)
536541
XCTAssertTrue(parser.needToRecordSummary)
537542
}
543+
#endif
538544

539545
func testTestsRunCompletion() { }
540546

Tests/XcbeautifyLibTests/RendererTests/TerminalRendererTests.swift

+10
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ final class TerminalRendererTests: XCTestCase {
207207
#endif
208208
}
209209

210+
#if os(macOS)
210211
func testExecutedWithSkipped() {
211212
let input1 = "Test Suite 'All tests' failed at 2022-01-15 21:31:49.073."
212213
let input2 = "Executed 56 tests, with 3 test skipped and 2 failures (1 unexpected) in 1.029 (1.029) seconds"
@@ -248,6 +249,7 @@ final class TerminalRendererTests: XCTestCase {
248249
XCTAssertEqual(parser.summary?.skippedCount, 4)
249250
XCTAssertEqual(parser.summary?.time, 4.029)
250251
}
252+
#endif
251253

252254
func testFailingTest() { }
253255

@@ -323,15 +325,19 @@ final class TerminalRendererTests: XCTestCase {
323325

324326
func testNoCertificate() { }
325327

328+
#if os(macOS)
326329
func testTestCaseWithSpacesPassed() {
327330
let formatted = noColoredFormatted("Test Case '-[MyProject.MyTestSuite some component, when the disk is full, will display an error]' passed (0.005 seconds).")
328331
XCTAssertEqual(formatted, " ✔ some component, when the disk is full, will display an error (0.005 seconds)")
329332
}
333+
#endif
330334

335+
#if os(macOS)
331336
func testTestCaseWithSpacesFailed() {
332337
let formatted = noColoredFormatted("/Users/jsmith/MyProject/Example.swift:12: error: -[MyProject.MyTestSuite one, when added to two, produces three] : expected to equal <3>, got <4>")
333338
XCTAssertEqual(formatted, " ✖ one, when added to two, produces three, expected to equal <3>, got <4>")
334339
}
340+
#endif
335341

336342
func testParallelTestCaseFailed() {
337343
let formatted = noColoredFormatted("Test case 'XcbeautifyLibTests.testBuildTarget()' failed on 'xctest (49438)' (0.131 seconds)")
@@ -494,6 +500,7 @@ final class TerminalRendererTests: XCTestCase {
494500

495501
func testTestSuiteStarted() { }
496502

503+
#if os(macOS)
497504
func testTestSuiteAllTestsPassed() {
498505
let input = "Test Suite 'All tests' passed at 2022-01-15 21:31:49.073."
499506

@@ -502,7 +509,9 @@ final class TerminalRendererTests: XCTestCase {
502509
XCTAssertNil(formatted)
503510
XCTAssertTrue(parser.needToRecordSummary)
504511
}
512+
#endif
505513

514+
#if os(macOS)
506515
func testTestSuiteAllTestsFailed() {
507516
let input = "Test Suite 'All tests' failed at 2022-01-15 21:31:49.073."
508517

@@ -511,6 +520,7 @@ final class TerminalRendererTests: XCTestCase {
511520
XCTAssertNil(formatted)
512521
XCTAssertTrue(parser.needToRecordSummary)
513522
}
523+
#endif
514524

515525
func testTestsRunCompletion() { }
516526

Tests/XcbeautifyLibTests/XCTestManifests.swift

-227
This file was deleted.

0 commit comments

Comments
 (0)