diff --git a/changelog.md b/changelog.md index 5eaf22a..8e985f4 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +# 1.1.2 + +- Updated test files to follow a more modern design. + # 1.1.1 - Fixed an issue causing help functions to be marked as test cases diff --git a/tests/compile-error/Tests/CompileErrorTests/CompileErrorTests.swift b/tests/compile-error/Tests/CompileErrorTests/CompileErrorTests.swift index 9bee869..d8ad953 100644 --- a/tests/compile-error/Tests/CompileErrorTests/CompileErrorTests.swift +++ b/tests/compile-error/Tests/CompileErrorTests/CompileErrorTests.swift @@ -6,8 +6,4 @@ final class CompileErrorTests: XCTestCase { func testAdd() { XCTAssertEqual(sum(2, 3), 5) } - - static var allTests = [ - ("testAdd", testAdd) - ] } diff --git a/tests/compile-error/Tests/CompileErrorTests/XCTestManifests.swift b/tests/compile-error/Tests/CompileErrorTests/XCTestManifests.swift deleted file mode 100644 index 9809232..0000000 --- a/tests/compile-error/Tests/CompileErrorTests/XCTestManifests.swift +++ /dev/null @@ -1,9 +0,0 @@ -import XCTest - -#if !canImport(ObjectiveC) -public func allTests() -> [XCTestCaseEntry] { - return [ - testCase(CompileErrorTests.allTests), - ] -} -#endif diff --git a/tests/compile-error/Tests/LinuxMain.swift b/tests/compile-error/Tests/LinuxMain.swift deleted file mode 100644 index 106c822..0000000 --- a/tests/compile-error/Tests/LinuxMain.swift +++ /dev/null @@ -1,7 +0,0 @@ -import XCTest - -import CompileErrorTests - -var tests = [XCTestCaseEntry]() -tests += CompileErrorTests.allTests() -XCTMain(tests) diff --git a/tests/multiple-tests-all-pass/Tests/LinuxMain.swift b/tests/multiple-tests-all-pass/Tests/LinuxMain.swift deleted file mode 100644 index 7d0c70f..0000000 --- a/tests/multiple-tests-all-pass/Tests/LinuxMain.swift +++ /dev/null @@ -1,7 +0,0 @@ -import XCTest - -import TaskMultipleAllPassTests - -var tests = [XCTestCaseEntry]() -tests += TaskMultipleAllPassTests.allTests() -XCTMain(tests) diff --git a/tests/multiple-tests-all-pass/Tests/TaskMultipleAllPassTests/TaskMultipleAllPassTests.swift b/tests/multiple-tests-all-pass/Tests/TaskMultipleAllPassTests/TaskMultipleAllPassTests.swift index f2b572b..9db051c 100644 --- a/tests/multiple-tests-all-pass/Tests/TaskMultipleAllPassTests/TaskMultipleAllPassTests.swift +++ b/tests/multiple-tests-all-pass/Tests/TaskMultipleAllPassTests/TaskMultipleAllPassTests.swift @@ -14,12 +14,6 @@ final class TaskMultipleAllPassTests: XCTestCase { func testMul() { XCTAssertEqual(mul(2, 3), 6) } - - static var allTests = [ - ("testAdd", testAdd), - ("testSub", testSub), - ("testMul", testMul), - ] } final class TaskSecondSuite: XCTestCase { @@ -34,10 +28,4 @@ final class TaskSecondSuite: XCTestCase { func testMul_2() { XCTAssertEqual(mul(12, 13), 156) } - - static var allTests = [ - ("testAdd_2", testAdd_2), - ("testSub_2", testSub_2), - ("testMul_2", testMul_2), - ] } diff --git a/tests/multiple-tests-all-pass/Tests/TaskMultipleAllPassTests/XCTestManifests.swift b/tests/multiple-tests-all-pass/Tests/TaskMultipleAllPassTests/XCTestManifests.swift deleted file mode 100644 index 5b54717..0000000 --- a/tests/multiple-tests-all-pass/Tests/TaskMultipleAllPassTests/XCTestManifests.swift +++ /dev/null @@ -1,10 +0,0 @@ -import XCTest - -#if !canImport(ObjectiveC) -public func allTests() -> [XCTestCaseEntry] { - return [ - testCase(TaskMultipleAllPassTests.allTests), - testCase(TaskSecondSuite.allTests), - ] -} -#endif diff --git a/tests/multiple-tests-multiple-fails/Tests/LinuxMain.swift b/tests/multiple-tests-multiple-fails/Tests/LinuxMain.swift deleted file mode 100644 index 92bf68e..0000000 --- a/tests/multiple-tests-multiple-fails/Tests/LinuxMain.swift +++ /dev/null @@ -1,6 +0,0 @@ -import TaskMultipleMultipleFailsTests -import XCTest - -var tests = [XCTestCaseEntry]() -tests += TaskMultipleMultipleFailsTests.allTests() -XCTMain(tests) diff --git a/tests/multiple-tests-multiple-fails/Tests/TaskMultipleMultipleFailsTests/TaskMultipleMultipleFailsTests.swift b/tests/multiple-tests-multiple-fails/Tests/TaskMultipleMultipleFailsTests/TaskMultipleMultipleFailsTests.swift index cec0bf8..d45be44 100644 --- a/tests/multiple-tests-multiple-fails/Tests/TaskMultipleMultipleFailsTests/TaskMultipleMultipleFailsTests.swift +++ b/tests/multiple-tests-multiple-fails/Tests/TaskMultipleMultipleFailsTests/TaskMultipleMultipleFailsTests.swift @@ -14,10 +14,4 @@ final class TaskMultipleMultipleFailsTests: XCTestCase { func testMul() { XCTAssertEqual(mul(2, 3), 6) } - - static var allTests = [ - ("testAdd", testAdd), - ("testSub", testSub), - ("testMul", testMul), - ] } diff --git a/tests/multiple-tests-multiple-fails/Tests/TaskMultipleMultipleFailsTests/XCTestManifests.swift b/tests/multiple-tests-multiple-fails/Tests/TaskMultipleMultipleFailsTests/XCTestManifests.swift deleted file mode 100644 index cdb64ee..0000000 --- a/tests/multiple-tests-multiple-fails/Tests/TaskMultipleMultipleFailsTests/XCTestManifests.swift +++ /dev/null @@ -1,9 +0,0 @@ -import XCTest - -#if !canImport(ObjectiveC) - public func allTests() -> [XCTestCaseEntry] { - return [ - testCase(TaskMultipleMultipleFailsTests.allTests) - ] - } -#endif diff --git a/tests/multiple-tests-single-fail/Tests/LinuxMain.swift b/tests/multiple-tests-single-fail/Tests/LinuxMain.swift deleted file mode 100644 index 49ee8dd..0000000 --- a/tests/multiple-tests-single-fail/Tests/LinuxMain.swift +++ /dev/null @@ -1,6 +0,0 @@ -import TaskMultipleSingleFailTests -import XCTest - -var tests = [XCTestCaseEntry]() -tests += TaskMultipleSingleFailTests.allTests() -XCTMain(tests) diff --git a/tests/multiple-tests-single-fail/Tests/TaskMultipleSingleFailTests/TaskMultipleSingleFailTests.swift b/tests/multiple-tests-single-fail/Tests/TaskMultipleSingleFailTests/TaskMultipleSingleFailTests.swift index a062f17..bf3228f 100644 --- a/tests/multiple-tests-single-fail/Tests/TaskMultipleSingleFailTests/TaskMultipleSingleFailTests.swift +++ b/tests/multiple-tests-single-fail/Tests/TaskMultipleSingleFailTests/TaskMultipleSingleFailTests.swift @@ -16,12 +16,6 @@ final class TaskMultipleSingleFailTests: XCTestCase { func testMul() { XCTAssertEqual(mul(2, 3), 6) } - - static var allTests = [ - ("testAdd", testAdd), - ("testSub", testSub), - ("testMul", testMul), - ] } final class TaskSecondSuite: XCTestCase { @@ -38,10 +32,4 @@ final class TaskSecondSuite: XCTestCase { func testMul_2() { XCTAssertEqual(mul(12, 13), 156) } - - static var allTests = [ - ("testAdd_2", testAdd_2), - ("testSub_2", testSub_2), - ("testMul_2", testMul_2), - ] } diff --git a/tests/multiple-tests-single-fail/Tests/TaskMultipleSingleFailTests/XCTestManifests.swift b/tests/multiple-tests-single-fail/Tests/TaskMultipleSingleFailTests/XCTestManifests.swift deleted file mode 100644 index 2dfee87..0000000 --- a/tests/multiple-tests-single-fail/Tests/TaskMultipleSingleFailTests/XCTestManifests.swift +++ /dev/null @@ -1,10 +0,0 @@ -import XCTest - -#if !canImport(ObjectiveC) - public func allTests() -> [XCTestCaseEntry] { - return [ - testCase(TaskMultipleSingleFailTests.allTests), - testCase(TaskSecondSuite.allTests), - ] - } -#endif diff --git a/tests/multiple-tests-with-exception/Tests/LinuxMain.swift b/tests/multiple-tests-with-exception/Tests/LinuxMain.swift deleted file mode 100644 index 23dbd17..0000000 --- a/tests/multiple-tests-with-exception/Tests/LinuxMain.swift +++ /dev/null @@ -1,6 +0,0 @@ -import MultipleWithExceptionTests -import XCTest - -var tests = [XCTestCaseEntry]() -tests += MultipleWithExceptionTests.allTests() -XCTMain(tests) diff --git a/tests/multiple-tests-with-exception/Tests/MultipleWithExceptionTests/MultipleWithExceptionTests.swift b/tests/multiple-tests-with-exception/Tests/MultipleWithExceptionTests/MultipleWithExceptionTests.swift index 98a6b84..4ead69b 100644 --- a/tests/multiple-tests-with-exception/Tests/MultipleWithExceptionTests/MultipleWithExceptionTests.swift +++ b/tests/multiple-tests-with-exception/Tests/MultipleWithExceptionTests/MultipleWithExceptionTests.swift @@ -18,11 +18,4 @@ final class MultipleWithExceptionTests: XCTestCase { func testThrow() { XCTAssertEqual(try throwErr(2, 0), 6) } - - static var allTests = [ - ("testAdd", testAdd), - ("testSub", testSub), - ("testMul", testMul), - ("testThrow", testThrow), - ] } diff --git a/tests/multiple-tests-with-exception/Tests/MultipleWithExceptionTests/XCTestManifests.swift b/tests/multiple-tests-with-exception/Tests/MultipleWithExceptionTests/XCTestManifests.swift deleted file mode 100644 index cbab108..0000000 --- a/tests/multiple-tests-with-exception/Tests/MultipleWithExceptionTests/XCTestManifests.swift +++ /dev/null @@ -1,9 +0,0 @@ -import XCTest - -#if !canImport(ObjectiveC) - public func allTests() -> [XCTestCaseEntry] { - return [ - testCase(MultipleWithExceptionTests.allTests) - ] - } -#endif diff --git a/tests/single-test-that-fails/Tests/LinuxMain.swift b/tests/single-test-that-fails/Tests/LinuxMain.swift deleted file mode 100644 index cb1beda..0000000 --- a/tests/single-test-that-fails/Tests/LinuxMain.swift +++ /dev/null @@ -1,6 +0,0 @@ -import SingleThatFailsTests -import XCTest - -var tests = [XCTestCaseEntry]() -tests += SingleThatFailsTests.allTests() -XCTMain(tests) diff --git a/tests/single-test-that-fails/Tests/SingleThatFailsTests/SingleThatFailsTests.swift b/tests/single-test-that-fails/Tests/SingleThatFailsTests/SingleThatFailsTests.swift index d456db7..1a06948 100644 --- a/tests/single-test-that-fails/Tests/SingleThatFailsTests/SingleThatFailsTests.swift +++ b/tests/single-test-that-fails/Tests/SingleThatFailsTests/SingleThatFailsTests.swift @@ -6,8 +6,4 @@ final class SingleThatFailsTests: XCTestCase { func testAdd() { XCTAssertEqual(sum(2, 3), 5, "2+3 should equal 5") } - - static var allTests = [ - ("testAdd", testAdd) - ] } diff --git a/tests/single-test-that-fails/Tests/SingleThatFailsTests/XCTestManifests.swift b/tests/single-test-that-fails/Tests/SingleThatFailsTests/XCTestManifests.swift deleted file mode 100644 index d35899b..0000000 --- a/tests/single-test-that-fails/Tests/SingleThatFailsTests/XCTestManifests.swift +++ /dev/null @@ -1,9 +0,0 @@ -import XCTest - -#if !canImport(ObjectiveC) - public func allTests() -> [XCTestCaseEntry] { - return [ - testCase(SingleThatFailsTests.allTests) - ] - } -#endif diff --git a/tests/single-test-that-passes/Tests/LinuxMain.swift b/tests/single-test-that-passes/Tests/LinuxMain.swift deleted file mode 100644 index c2aee5c..0000000 --- a/tests/single-test-that-passes/Tests/LinuxMain.swift +++ /dev/null @@ -1,6 +0,0 @@ -import SingleThatPassesTests -import XCTest - -var tests = [XCTestCaseEntry]() -tests += SingleThatPassesTests.allTests() -XCTMain(tests) diff --git a/tests/single-test-that-passes/Tests/SingleThatPassesTests/SingleThatPassesTests.swift b/tests/single-test-that-passes/Tests/SingleThatPassesTests/SingleThatPassesTests.swift index 8a8d431..dc275ee 100644 --- a/tests/single-test-that-passes/Tests/SingleThatPassesTests/SingleThatPassesTests.swift +++ b/tests/single-test-that-passes/Tests/SingleThatPassesTests/SingleThatPassesTests.swift @@ -6,8 +6,4 @@ final class SingleThatPassesTests: XCTestCase { func testAdd() { XCTAssertEqual(sum(2, 3), 5, "2+3 should equal 5") } - - static var allTests = [ - ("testAdd", testAdd) - ] } diff --git a/tests/single-test-that-passes/Tests/SingleThatPassesTests/XCTestManifests.swift b/tests/single-test-that-passes/Tests/SingleThatPassesTests/XCTestManifests.swift deleted file mode 100644 index 76f6b7a..0000000 --- a/tests/single-test-that-passes/Tests/SingleThatPassesTests/XCTestManifests.swift +++ /dev/null @@ -1,9 +0,0 @@ -import XCTest - -#if !canImport(ObjectiveC) - public func allTests() -> [XCTestCaseEntry] { - return [ - testCase(SingleThatPassesTests.allTests) - ] - } -#endif diff --git a/tests/single-test-with-exception/Tests/LinuxMain.swift b/tests/single-test-with-exception/Tests/LinuxMain.swift deleted file mode 100644 index 778ae21..0000000 --- a/tests/single-test-with-exception/Tests/LinuxMain.swift +++ /dev/null @@ -1,6 +0,0 @@ -import SingleWithExceptionTests -import XCTest - -var tests = [XCTestCaseEntry]() -tests += SingleWithExceptionTests.allTests() -XCTMain(tests) diff --git a/tests/single-test-with-exception/Tests/SingleWithExceptionTests/SingleWithExceptionTests.swift b/tests/single-test-with-exception/Tests/SingleWithExceptionTests/SingleWithExceptionTests.swift index 376a9c2..5e10e84 100644 --- a/tests/single-test-with-exception/Tests/SingleWithExceptionTests/SingleWithExceptionTests.swift +++ b/tests/single-test-with-exception/Tests/SingleWithExceptionTests/SingleWithExceptionTests.swift @@ -6,8 +6,4 @@ final class SingleWithExceptionTests: XCTestCase { func testAdd() { XCTAssertEqual(try sum(2, 3), 5, "2+3 should equal 5") } - - static var allTests = [ - ("testAdd", testAdd) - ] } diff --git a/tests/single-test-with-exception/Tests/SingleWithExceptionTests/XCTestManifests.swift b/tests/single-test-with-exception/Tests/SingleWithExceptionTests/XCTestManifests.swift deleted file mode 100644 index 61fb57b..0000000 --- a/tests/single-test-with-exception/Tests/SingleWithExceptionTests/XCTestManifests.swift +++ /dev/null @@ -1,9 +0,0 @@ -import XCTest - -#if !canImport(ObjectiveC) - public func allTests() -> [XCTestCaseEntry] { - return [ - testCase(SingleWithExceptionTests.allTests) - ] - } -#endif