From 76e057bd0a993574510e94e7192f9ce082267461 Mon Sep 17 00:00:00 2001 From: Sho Ikeda Date: Mon, 16 Sep 2019 16:29:46 +0900 Subject: [PATCH] Regenerate LinuxMain with Swift 5 compiler and remove XCTestCaseProvider - `__allTests` is renamed to `__allTests_$className` so we can't access it statically - Those definitions are now gated with `if !canImport(ObjectiveC)` so we can't access them on macOS --- Nimble.xcodeproj/project.pbxproj | 12 - Tests/NimbleTests/AsynchronousTest.swift | 2 +- .../Helpers/XCTestCaseProvider.swift | 62 ----- Tests/NimbleTests/Matchers/AllPassTest.swift | 2 +- .../NimbleTests/Matchers/BeAKindOfTest.swift | 4 +- .../Matchers/BeAnInstanceOfTest.swift | 2 +- .../NimbleTests/Matchers/BeCloseToTest.swift | 2 +- Tests/NimbleTests/Matchers/BeEmptyTest.swift | 2 +- .../Matchers/BeGreaterThanOrEqualToTest.swift | 2 +- .../Matchers/BeGreaterThanTest.swift | 2 +- .../Matchers/BeIdenticalToObjectTest.swift | 2 +- .../Matchers/BeIdenticalToTest.swift | 2 +- .../Matchers/BeLessThanOrEqualToTest.swift | 2 +- .../NimbleTests/Matchers/BeLessThanTest.swift | 2 +- .../NimbleTests/Matchers/BeLogicalTest.swift | 8 +- Tests/NimbleTests/Matchers/BeNilTest.swift | 2 +- Tests/NimbleTests/Matchers/BeVoidTest.swift | 2 +- .../NimbleTests/Matchers/BeginWithTest.swift | 2 +- .../ContainElementSatisfyingTest.swift | 2 +- Tests/NimbleTests/Matchers/ContainTest.swift | 2 +- .../Matchers/ElementsEqualTest.swift | 2 +- Tests/NimbleTests/Matchers/EndWithTest.swift | 2 +- Tests/NimbleTests/Matchers/EqualTest.swift | 2 +- .../NimbleTests/Matchers/HaveCountTest.swift | 2 +- .../NimbleTests/Matchers/MatchErrorTest.swift | 2 +- Tests/NimbleTests/Matchers/MatchTest.swift | 2 +- .../Matchers/PostNotificationTest.swift | 2 +- .../Matchers/SatisfyAllOfTest.swift | 2 +- .../Matchers/SatisfyAnyOfTest.swift | 2 +- .../Matchers/ThrowAssertionTest.swift | 16 +- .../NimbleTests/Matchers/ThrowErrorTest.swift | 2 +- .../NimbleTests/Matchers/ToSucceedTest.swift | 2 +- Tests/NimbleTests/SynchronousTest.swift | 2 +- Tests/NimbleTests/UserDescriptionTest.swift | 2 +- Tests/NimbleTests/XCTestManifests.swift | 262 +++++++++++++----- 35 files changed, 238 insertions(+), 184 deletions(-) delete mode 100644 Tests/NimbleTests/Helpers/XCTestCaseProvider.swift diff --git a/Nimble.xcodeproj/project.pbxproj b/Nimble.xcodeproj/project.pbxproj index 68a90e368..567379e5a 100644 --- a/Nimble.xcodeproj/project.pbxproj +++ b/Nimble.xcodeproj/project.pbxproj @@ -281,9 +281,6 @@ 29EA59641B551ED2002D767E /* ThrowErrorTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29EA59621B551ED2002D767E /* ThrowErrorTest.swift */; }; 29EA59661B551EE6002D767E /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29EA59651B551EE6002D767E /* ThrowError.swift */; }; 29EA59671B551EE6002D767E /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29EA59651B551EE6002D767E /* ThrowError.swift */; }; - 347155CA1C337C8900549F03 /* XCTestCaseProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 347155C91C337C8900549F03 /* XCTestCaseProvider.swift */; }; - 347155CB1C337C8900549F03 /* XCTestCaseProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 347155C91C337C8900549F03 /* XCTestCaseProvider.swift */; }; - 347155CC1C337C8900549F03 /* XCTestCaseProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 347155C91C337C8900549F03 /* XCTestCaseProvider.swift */; }; 472FD1351B9E085700C7B8DA /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 472FD1341B9E085700C7B8DA /* HaveCount.swift */; }; 472FD1391B9E0A9700C7B8DA /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 472FD1341B9E085700C7B8DA /* HaveCount.swift */; }; 472FD13A1B9E0A9F00C7B8DA /* HaveCountTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 472FD1361B9E094B00C7B8DA /* HaveCountTest.swift */; }; @@ -350,7 +347,6 @@ B20058C520E92CE400C1264D /* ElementsEqualTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = B20058C420E92CE400C1264D /* ElementsEqualTest.swift */; }; B20058C620E92CE400C1264D /* ElementsEqualTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = B20058C420E92CE400C1264D /* ElementsEqualTest.swift */; }; B20058C720E92CE400C1264D /* ElementsEqualTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = B20058C420E92CE400C1264D /* ElementsEqualTest.swift */; }; - CD037213207DCC580047AF28 /* XCTestManifests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD037212207DCC580047AF28 /* XCTestManifests.swift */; }; CD3D9A79232647BC00802581 /* CwlCatchBadInstructionPosix.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD3D9A78232647BC00802581 /* CwlCatchBadInstructionPosix.swift */; }; CD3D9A7A232648E600802581 /* CwlCatchException.h in Headers */ = {isa = PBXBuildFile; fileRef = CDFB6A221F7E07C600AD8CC7 /* CwlCatchException.h */; settings = {ATTRIBUTES = (Public, ); }; }; CD79C99E1D2CC832004B6F9A /* ObjCAsyncTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F4A56651A3B305F009E1637 /* ObjCAsyncTest.m */; }; @@ -590,7 +586,6 @@ 1FE661561E6574E20035F243 /* ExpectationMessage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExpectationMessage.swift; sourceTree = ""; }; 29EA59621B551ED2002D767E /* ThrowErrorTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThrowErrorTest.swift; sourceTree = ""; }; 29EA59651B551EE6002D767E /* ThrowError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThrowError.swift; sourceTree = ""; }; - 347155C91C337C8900549F03 /* XCTestCaseProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XCTestCaseProvider.swift; sourceTree = ""; }; 472FD1341B9E085700C7B8DA /* HaveCount.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HaveCount.swift; sourceTree = ""; }; 472FD1361B9E094B00C7B8DA /* HaveCountTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HaveCountTest.swift; sourceTree = ""; }; 4793854C1BA0BB2500296F85 /* ObjCHaveCountTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ObjCHaveCountTest.m; sourceTree = ""; }; @@ -615,7 +610,6 @@ AE7ADE481C80C00D00B94CD3 /* MatchErrorTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MatchErrorTest.swift; sourceTree = ""; }; B20058C020E92C7500C1264D /* ElementsEqual.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ElementsEqual.swift; sourceTree = ""; }; B20058C420E92CE400C1264D /* ElementsEqualTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ElementsEqualTest.swift; sourceTree = ""; }; - CD037212207DCC580047AF28 /* XCTestManifests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XCTestManifests.swift; sourceTree = ""; }; CD3D9A78232647BC00802581 /* CwlCatchBadInstructionPosix.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CwlCatchBadInstructionPosix.swift; sourceTree = ""; }; CDFB6A1E1F7E07C600AD8CC7 /* CwlCatchException.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CwlCatchException.swift; sourceTree = ""; }; CDFB6A201F7E07C600AD8CC7 /* CwlCatchException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CwlCatchException.m; sourceTree = ""; }; @@ -691,7 +685,6 @@ children = ( 1F14FB63194180C5009F2A08 /* utils.swift */, 1F0648CB19639F5A001F9C46 /* ObjectWithLazyProperty.swift */, - 347155C91C337C8900549F03 /* XCTestCaseProvider.swift */, ); path = Helpers; sourceTree = ""; @@ -773,7 +766,6 @@ 1F0648D31963AAB2001F9C46 /* SynchronousTest.swift */, 965B0D0B1B62C06D0005AE66 /* UserDescriptionTest.swift */, 6CAEDD091CAEA86F003F1584 /* LinuxSupport.swift */, - CD037212207DCC580047AF28 /* XCTestManifests.swift */, 1FFD729A1963FC8200CD29A2 /* objc */, 1F14FB61194180A7009F2A08 /* Helpers */, 1F925EE3195C11B000ED456B /* Matchers */, @@ -1436,7 +1428,6 @@ DD9A9A8F19CF439B00706F49 /* BeIdenticalToObjectTest.swift in Sources */, 1F4BB8B71DACA0E40048464B /* ThrowAssertionTest.swift in Sources */, 1F0648D41963AAB2001F9C46 /* SynchronousTest.swift in Sources */, - 347155CA1C337C8900549F03 /* XCTestCaseProvider.swift in Sources */, 4793854D1BA0BB2500296F85 /* ObjCHaveCountTest.m in Sources */, 1F925F08195C18CF00ED456B /* BeGreaterThanTest.swift in Sources */, 7B5358BA1C3846C900A23FAA /* SatisfyAnyOfTest.swift in Sources */, @@ -1569,7 +1560,6 @@ 7A6AB2C41E7F547E00A2F694 /* ToSucceedTest.swift in Sources */, CD79C9A71D2CC848004B6F9A /* ObjCBeGreaterThanTest.m in Sources */, CD79C9A51D2CC848004B6F9A /* ObjCBeginWithTest.m in Sources */, - 347155CC1C337C8900549F03 /* XCTestCaseProvider.swift in Sources */, 1F5DF1AA1BDCA10200C3A531 /* RaisesExceptionTest.swift in Sources */, 1F5DF1941BDCA10200C3A531 /* UserDescriptionTest.swift in Sources */, CD79C9AF1D2CC848004B6F9A /* ObjCContainTest.m in Sources */, @@ -1671,7 +1661,6 @@ DDB4D5F119FE442800E9D9FE /* MatchTest.swift in Sources */, 1F4A56741A3B3210009E1637 /* ObjCBeginWithTest.m in Sources */, 1F4A56831A3B336F009E1637 /* ObjCBeLessThanOrEqualToTest.m in Sources */, - CD037213207DCC580047AF28 /* XCTestManifests.swift in Sources */, 7B13BA0D1DD361DE00C9098C /* ContainElementSatisfyingTest.swift in Sources */, 1F925F03195C189500ED456B /* ContainTest.swift in Sources */, A8A3B6FD2073644700E25A08 /* ObjcStringersTest.m in Sources */, @@ -1714,7 +1703,6 @@ DD9A9A9019CF43AD00706F49 /* BeIdenticalToObjectTest.swift in Sources */, 1F4BB8B61DACA0E30048464B /* ThrowAssertionTest.swift in Sources */, 1F0648D51963AAB2001F9C46 /* SynchronousTest.swift in Sources */, - 347155CB1C337C8900549F03 /* XCTestCaseProvider.swift in Sources */, 4793854E1BA0BB2500296F85 /* ObjCHaveCountTest.m in Sources */, 1F925F09195C18CF00ED456B /* BeGreaterThanTest.swift in Sources */, 7B5358BB1C3846C900A23FAA /* SatisfyAnyOfTest.swift in Sources */, diff --git a/Tests/NimbleTests/AsynchronousTest.swift b/Tests/NimbleTests/AsynchronousTest.swift index 307412e5a..0195a92a7 100644 --- a/Tests/NimbleTests/AsynchronousTest.swift +++ b/Tests/NimbleTests/AsynchronousTest.swift @@ -3,7 +3,7 @@ import Foundation import XCTest import Nimble -final class AsyncTest: XCTestCase, XCTestCaseProvider { +final class AsyncTest: XCTestCase { class Error: Swift.Error {} let errorToThrow = Error() diff --git a/Tests/NimbleTests/Helpers/XCTestCaseProvider.swift b/Tests/NimbleTests/Helpers/XCTestCaseProvider.swift deleted file mode 100644 index 08567fd78..000000000 --- a/Tests/NimbleTests/Helpers/XCTestCaseProvider.swift +++ /dev/null @@ -1,62 +0,0 @@ -import Foundation -import XCTest - -// XCTestCaseProvider should be adopted by all XCTestCase subclasses. It provides a -// mechanism for us to fail tests in Xcode which haven't been included in the `allTests` -// list for swift-corelibs-xctest which is unable to dynamically discover tests. Note -// that only `static var __allTests` needs to be explicitly implemented, as `allTestNames` -// has a default implementation provided by a protocol extension. - -// Implementation note: This is broken down into two separate protocols because we need a -// protocol with no Self references to which we can cast XCTestCase instances in a non-generic context. - -public protocol XCTestCaseProviderStatic { - // This should be explicitly implemented by XCTestCase subclasses - static var __allTests: [(String, (Self) -> () -> ())] { get } -} - -public protocol XCTestCaseNameProvider { - // This does not need to be explicitly implemented because of the protocol extension below - var allTestNames: [String] { get } -} - -#if os(macOS) -public protocol XCTestCaseProvider: XCTestCaseProviderStatic, XCTestCaseNameProvider {} - -extension XCTestCaseProvider { - var allTestNames: [String] { - return type(of: self).__allTests.map({ name, _ in - return name - }) - } -} -#else -public protocol XCTestCaseProvider {} -#endif - -#if os(macOS) - -extension XCTestCase { - override open func tearDown() { - if let provider = self as? XCTestCaseNameProvider { - provider.assertContainsTest(invocation!.selector.description) - } - - super.tearDown() - } -} - -extension XCTestCaseNameProvider { - fileprivate func assertContainsTest(_ name: String) { - let contains = self.allTestNames.contains(name) - XCTAssert( - contains, - """ - Test '\(name)' is missing from the __allTests array. - Please run `$ swift test --generate-linuxmain` to update the manifests. - """ - ) - } -} - -#endif diff --git a/Tests/NimbleTests/Matchers/AllPassTest.swift b/Tests/NimbleTests/Matchers/AllPassTest.swift index 683121c9b..17a330f95 100644 --- a/Tests/NimbleTests/Matchers/AllPassTest.swift +++ b/Tests/NimbleTests/Matchers/AllPassTest.swift @@ -42,7 +42,7 @@ extension Optional where Wrapped: Comparable { } } -final class AllPassTest: XCTestCase, XCTestCaseProvider { +final class AllPassTest: XCTestCase { func testAllPassArray() { expect([1, 2, 3, 4]).to(allPass({$0 < 5})) expect([1, 2, 3, 4]).toNot(allPass({$0 > 5})) diff --git a/Tests/NimbleTests/Matchers/BeAKindOfTest.swift b/Tests/NimbleTests/Matchers/BeAKindOfTest.swift index 00a35ff08..2ea79b870 100644 --- a/Tests/NimbleTests/Matchers/BeAKindOfTest.swift +++ b/Tests/NimbleTests/Matchers/BeAKindOfTest.swift @@ -7,7 +7,7 @@ private protocol TestProtocol {} private class TestClassConformingToProtocol: TestProtocol {} private struct TestStructConformingToProtocol: TestProtocol {} -final class BeAKindOfSwiftTest: XCTestCase, XCTestCaseProvider { +final class BeAKindOfSwiftTest: XCTestCase { enum TestEnum { case one, two } @@ -47,7 +47,7 @@ final class BeAKindOfSwiftTest: XCTestCase, XCTestCaseProvider { } } -final class BeAKindOfObjCTest: XCTestCase, XCTestCaseProvider { +final class BeAKindOfObjCTest: XCTestCase { func testPositiveMatch() { #if canImport(Darwin) expect(TestNull()).to(beAKindOf(NSNull.self)) diff --git a/Tests/NimbleTests/Matchers/BeAnInstanceOfTest.swift b/Tests/NimbleTests/Matchers/BeAnInstanceOfTest.swift index 0d379a20f..39ae4ce0b 100644 --- a/Tests/NimbleTests/Matchers/BeAnInstanceOfTest.swift +++ b/Tests/NimbleTests/Matchers/BeAnInstanceOfTest.swift @@ -6,7 +6,7 @@ private protocol TestProtocol {} private class TestClassConformingToProtocol: TestProtocol {} private struct TestStructConformingToProtocol: TestProtocol {} -final class BeAnInstanceOfTest: XCTestCase, XCTestCaseProvider { +final class BeAnInstanceOfTest: XCTestCase { func testPositiveMatch() { expect(NSNull()).to(beAnInstanceOf(NSNull.self)) expect(NSNumber(value: 1)).toNot(beAnInstanceOf(NSDate.self)) diff --git a/Tests/NimbleTests/Matchers/BeCloseToTest.swift b/Tests/NimbleTests/Matchers/BeCloseToTest.swift index f724be661..6059f48d9 100644 --- a/Tests/NimbleTests/Matchers/BeCloseToTest.swift +++ b/Tests/NimbleTests/Matchers/BeCloseToTest.swift @@ -2,7 +2,7 @@ import Foundation import XCTest import Nimble -final class BeCloseToTest: XCTestCase, XCTestCaseProvider { +final class BeCloseToTest: XCTestCase { func testBeCloseTo() { expect(1.2).to(beCloseTo(1.2001)) expect(1.2 as CDouble).to(beCloseTo(1.2001)) diff --git a/Tests/NimbleTests/Matchers/BeEmptyTest.swift b/Tests/NimbleTests/Matchers/BeEmptyTest.swift index fa6f9d784..94d75fa2b 100644 --- a/Tests/NimbleTests/Matchers/BeEmptyTest.swift +++ b/Tests/NimbleTests/Matchers/BeEmptyTest.swift @@ -2,7 +2,7 @@ import Foundation import XCTest import Nimble -final class BeEmptyTest: XCTestCase, XCTestCaseProvider { +final class BeEmptyTest: XCTestCase { func testBeEmptyPositive() { expect([] as [Int]).to(beEmpty()) expect([1]).toNot(beEmpty()) diff --git a/Tests/NimbleTests/Matchers/BeGreaterThanOrEqualToTest.swift b/Tests/NimbleTests/Matchers/BeGreaterThanOrEqualToTest.swift index 9ac561ffd..b81afa579 100644 --- a/Tests/NimbleTests/Matchers/BeGreaterThanOrEqualToTest.swift +++ b/Tests/NimbleTests/Matchers/BeGreaterThanOrEqualToTest.swift @@ -2,7 +2,7 @@ import Foundation import XCTest import Nimble -final class BeGreaterThanOrEqualToTest: XCTestCase, XCTestCaseProvider { +final class BeGreaterThanOrEqualToTest: XCTestCase { func testGreaterThanOrEqualTo() { expect(10).to(beGreaterThanOrEqualTo(10)) expect(10).to(beGreaterThanOrEqualTo(2)) diff --git a/Tests/NimbleTests/Matchers/BeGreaterThanTest.swift b/Tests/NimbleTests/Matchers/BeGreaterThanTest.swift index 3d742f477..69681bbd8 100644 --- a/Tests/NimbleTests/Matchers/BeGreaterThanTest.swift +++ b/Tests/NimbleTests/Matchers/BeGreaterThanTest.swift @@ -2,7 +2,7 @@ import Foundation import XCTest import Nimble -final class BeGreaterThanTest: XCTestCase, XCTestCaseProvider { +final class BeGreaterThanTest: XCTestCase { func testGreaterThan() { expect(10).to(beGreaterThan(2)) expect(1).toNot(beGreaterThan(2)) diff --git a/Tests/NimbleTests/Matchers/BeIdenticalToObjectTest.swift b/Tests/NimbleTests/Matchers/BeIdenticalToObjectTest.swift index b1155fb70..1f705bf42 100644 --- a/Tests/NimbleTests/Matchers/BeIdenticalToObjectTest.swift +++ b/Tests/NimbleTests/Matchers/BeIdenticalToObjectTest.swift @@ -2,7 +2,7 @@ import Foundation import XCTest import Nimble -final class BeIdenticalToObjectTest: XCTestCase, XCTestCaseProvider { +final class BeIdenticalToObjectTest: XCTestCase { private class BeIdenticalToObjectTester {} private let testObjectA = BeIdenticalToObjectTester() private let testObjectB = BeIdenticalToObjectTester() diff --git a/Tests/NimbleTests/Matchers/BeIdenticalToTest.swift b/Tests/NimbleTests/Matchers/BeIdenticalToTest.swift index 80d40e78e..e9c311e4d 100644 --- a/Tests/NimbleTests/Matchers/BeIdenticalToTest.swift +++ b/Tests/NimbleTests/Matchers/BeIdenticalToTest.swift @@ -2,7 +2,7 @@ import Foundation import XCTest @testable import Nimble -final class BeIdenticalToTest: XCTestCase, XCTestCaseProvider { +final class BeIdenticalToTest: XCTestCase { func testBeIdenticalToPositive() { let value = NSDate() expect(value).to(beIdenticalTo(value)) diff --git a/Tests/NimbleTests/Matchers/BeLessThanOrEqualToTest.swift b/Tests/NimbleTests/Matchers/BeLessThanOrEqualToTest.swift index dd8120d3a..7a543937f 100644 --- a/Tests/NimbleTests/Matchers/BeLessThanOrEqualToTest.swift +++ b/Tests/NimbleTests/Matchers/BeLessThanOrEqualToTest.swift @@ -2,7 +2,7 @@ import Foundation import XCTest import Nimble -final class BeLessThanOrEqualToTest: XCTestCase, XCTestCaseProvider { +final class BeLessThanOrEqualToTest: XCTestCase { func testLessThanOrEqualTo() { expect(10).to(beLessThanOrEqualTo(10)) expect(2).to(beLessThanOrEqualTo(10)) diff --git a/Tests/NimbleTests/Matchers/BeLessThanTest.swift b/Tests/NimbleTests/Matchers/BeLessThanTest.swift index d56023212..5bf4c6a49 100644 --- a/Tests/NimbleTests/Matchers/BeLessThanTest.swift +++ b/Tests/NimbleTests/Matchers/BeLessThanTest.swift @@ -2,7 +2,7 @@ import Foundation import XCTest import Nimble -final class BeLessThanTest: XCTestCase, XCTestCaseProvider { +final class BeLessThanTest: XCTestCase { func testLessThan() { expect(2).to(beLessThan(10)) expect(2).toNot(beLessThan(1)) diff --git a/Tests/NimbleTests/Matchers/BeLogicalTest.swift b/Tests/NimbleTests/Matchers/BeLogicalTest.swift index d9ef8eaca..dfe3bcd1e 100644 --- a/Tests/NimbleTests/Matchers/BeLogicalTest.swift +++ b/Tests/NimbleTests/Matchers/BeLogicalTest.swift @@ -29,7 +29,7 @@ enum ConvertsToBool: ExpressibleByBooleanLiteral, CustomStringConvertible { } } -final class BeTruthyTest: XCTestCase, XCTestCaseProvider { +final class BeTruthyTest: XCTestCase { func testShouldMatchNonNilTypes() { expect(true as Bool?).to(beTruthy()) @@ -110,7 +110,7 @@ final class BeTruthyTest: XCTestCase, XCTestCaseProvider { } } -final class BeTrueTest: XCTestCase, XCTestCaseProvider { +final class BeTrueTest: XCTestCase { func testShouldMatchTrue() { expect(true).to(beTrue()) @@ -138,7 +138,7 @@ final class BeTrueTest: XCTestCase, XCTestCaseProvider { } } -final class BeFalsyTest: XCTestCase, XCTestCaseProvider { +final class BeFalsyTest: XCTestCase { func testShouldMatchNilTypes() { expect(false as Bool?).to(beFalsy()) @@ -203,7 +203,7 @@ final class BeFalsyTest: XCTestCase, XCTestCaseProvider { } } -final class BeFalseTest: XCTestCase, XCTestCaseProvider { +final class BeFalseTest: XCTestCase { func testShouldNotMatchTrue() { expect(true).toNot(beFalse()) diff --git a/Tests/NimbleTests/Matchers/BeNilTest.swift b/Tests/NimbleTests/Matchers/BeNilTest.swift index 9e3711612..df35eeb0a 100644 --- a/Tests/NimbleTests/Matchers/BeNilTest.swift +++ b/Tests/NimbleTests/Matchers/BeNilTest.swift @@ -1,7 +1,7 @@ import XCTest import Nimble -final class BeNilTest: XCTestCase, XCTestCaseProvider { +final class BeNilTest: XCTestCase { func producesNil() -> [Int]? { return nil } diff --git a/Tests/NimbleTests/Matchers/BeVoidTest.swift b/Tests/NimbleTests/Matchers/BeVoidTest.swift index bb5d32434..bea7f4eb6 100644 --- a/Tests/NimbleTests/Matchers/BeVoidTest.swift +++ b/Tests/NimbleTests/Matchers/BeVoidTest.swift @@ -1,7 +1,7 @@ import XCTest import Nimble -final class BeVoidTest: XCTestCase, XCTestCaseProvider { +final class BeVoidTest: XCTestCase { func testBeVoid() { expect(()).to(beVoid()) expect(() as ()?).to(beVoid()) diff --git a/Tests/NimbleTests/Matchers/BeginWithTest.swift b/Tests/NimbleTests/Matchers/BeginWithTest.swift index 6805d7c60..e7e852ce9 100644 --- a/Tests/NimbleTests/Matchers/BeginWithTest.swift +++ b/Tests/NimbleTests/Matchers/BeginWithTest.swift @@ -2,7 +2,7 @@ import Foundation import XCTest import Nimble -final class BeginWithTest: XCTestCase, XCTestCaseProvider { +final class BeginWithTest: XCTestCase { func testPositiveMatches() { expect([1, 2, 3]).to(beginWith(1)) expect([1, 2, 3]).toNot(beginWith(2)) diff --git a/Tests/NimbleTests/Matchers/ContainElementSatisfyingTest.swift b/Tests/NimbleTests/Matchers/ContainElementSatisfyingTest.swift index 694437526..324b0c9f3 100644 --- a/Tests/NimbleTests/Matchers/ContainElementSatisfyingTest.swift +++ b/Tests/NimbleTests/Matchers/ContainElementSatisfyingTest.swift @@ -2,7 +2,7 @@ import Foundation import XCTest import Nimble -final class ContainElementSatisfyingTest: XCTestCase, XCTestCaseProvider { +final class ContainElementSatisfyingTest: XCTestCase { func testContainElementSatisfying() { var orderIndifferentArray = [1, 2, 3] expect(orderIndifferentArray).to(containElementSatisfying({ number in diff --git a/Tests/NimbleTests/Matchers/ContainTest.swift b/Tests/NimbleTests/Matchers/ContainTest.swift index 28f685e9f..c9b0177e8 100644 --- a/Tests/NimbleTests/Matchers/ContainTest.swift +++ b/Tests/NimbleTests/Matchers/ContainTest.swift @@ -2,7 +2,7 @@ import Foundation import XCTest import Nimble -final class ContainTest: XCTestCase, XCTestCaseProvider { +final class ContainTest: XCTestCase { func testContainSequence() { expect([1, 2, 3]).to(contain(1)) expect([1, 2, 3]).toNot(contain(4)) diff --git a/Tests/NimbleTests/Matchers/ElementsEqualTest.swift b/Tests/NimbleTests/Matchers/ElementsEqualTest.swift index ec7a0dd7f..c05c1ed9c 100644 --- a/Tests/NimbleTests/Matchers/ElementsEqualTest.swift +++ b/Tests/NimbleTests/Matchers/ElementsEqualTest.swift @@ -2,7 +2,7 @@ import Foundation import XCTest import Nimble -final class ElementsEqualTest: XCTestCase, XCTestCaseProvider { +final class ElementsEqualTest: XCTestCase { func testSequenceElementsEquality() { failsWithErrorMessageForNil("expected to elementsEqual , got ") { diff --git a/Tests/NimbleTests/Matchers/EndWithTest.swift b/Tests/NimbleTests/Matchers/EndWithTest.swift index 54794c56f..aac03cf82 100644 --- a/Tests/NimbleTests/Matchers/EndWithTest.swift +++ b/Tests/NimbleTests/Matchers/EndWithTest.swift @@ -2,7 +2,7 @@ import Foundation import XCTest import Nimble -final class EndWithTest: XCTestCase, XCTestCaseProvider { +final class EndWithTest: XCTestCase { func testEndWithPositives() { expect([1, 2, 3]).to(endWith(3)) expect([1, 2, 3]).toNot(endWith(2)) diff --git a/Tests/NimbleTests/Matchers/EqualTest.swift b/Tests/NimbleTests/Matchers/EqualTest.swift index 5b1aa499c..adef4f850 100644 --- a/Tests/NimbleTests/Matchers/EqualTest.swift +++ b/Tests/NimbleTests/Matchers/EqualTest.swift @@ -2,7 +2,7 @@ import Foundation import XCTest import Nimble -final class EqualTest: XCTestCase, XCTestCaseProvider { +final class EqualTest: XCTestCase { func testEquality() { expect(1 as CInt).to(equal(1 as CInt)) expect(1 as CInt).to(equal(1)) diff --git a/Tests/NimbleTests/Matchers/HaveCountTest.swift b/Tests/NimbleTests/Matchers/HaveCountTest.swift index 4ef610ea6..5b5f19411 100644 --- a/Tests/NimbleTests/Matchers/HaveCountTest.swift +++ b/Tests/NimbleTests/Matchers/HaveCountTest.swift @@ -1,7 +1,7 @@ import XCTest import Nimble -final class HaveCountTest: XCTestCase, XCTestCaseProvider { +final class HaveCountTest: XCTestCase { func testHaveCountForArray() { expect([1, 2, 3]).to(haveCount(3)) expect([1, 2, 3]).notTo(haveCount(1)) diff --git a/Tests/NimbleTests/Matchers/MatchErrorTest.swift b/Tests/NimbleTests/Matchers/MatchErrorTest.swift index bac76e95a..4e2fc1414 100644 --- a/Tests/NimbleTests/Matchers/MatchErrorTest.swift +++ b/Tests/NimbleTests/Matchers/MatchErrorTest.swift @@ -2,7 +2,7 @@ import Foundation import XCTest import Nimble -final class MatchErrorTest: XCTestCase, XCTestCaseProvider { +final class MatchErrorTest: XCTestCase { func testMatchErrorPositive() { expect(NimbleError.laugh).to(matchError(NimbleError.laugh)) expect(NimbleError.laugh).to(matchError(NimbleError.self)) diff --git a/Tests/NimbleTests/Matchers/MatchTest.swift b/Tests/NimbleTests/Matchers/MatchTest.swift index 1285eccfc..73b0c1667 100644 --- a/Tests/NimbleTests/Matchers/MatchTest.swift +++ b/Tests/NimbleTests/Matchers/MatchTest.swift @@ -1,7 +1,7 @@ import XCTest import Nimble -final class MatchTest: XCTestCase, XCTestCaseProvider { +final class MatchTest: XCTestCase { func testMatchPositive() { expect("11:14").to(match("\\d{2}:\\d{2}")) } diff --git a/Tests/NimbleTests/Matchers/PostNotificationTest.swift b/Tests/NimbleTests/Matchers/PostNotificationTest.swift index de6fe5dcd..04aee5a81 100644 --- a/Tests/NimbleTests/Matchers/PostNotificationTest.swift +++ b/Tests/NimbleTests/Matchers/PostNotificationTest.swift @@ -2,7 +2,7 @@ import XCTest import Nimble import Foundation -final class PostNotificationTest: XCTestCase, XCTestCaseProvider { +final class PostNotificationTest: XCTestCase { let notificationCenter = NotificationCenter() func testPassesWhenNoNotificationsArePosted() { diff --git a/Tests/NimbleTests/Matchers/SatisfyAllOfTest.swift b/Tests/NimbleTests/Matchers/SatisfyAllOfTest.swift index be60a41cb..b48a16e7e 100644 --- a/Tests/NimbleTests/Matchers/SatisfyAllOfTest.swift +++ b/Tests/NimbleTests/Matchers/SatisfyAllOfTest.swift @@ -2,7 +2,7 @@ import XCTest import Nimble import Foundation -final class SatisfyAllOfTest: XCTestCase, XCTestCaseProvider { +final class SatisfyAllOfTest: XCTestCase { func testSatisfyAllOf() { expect(2).to(satisfyAllOf(equal(2), beLessThan(3))) #if SUPPORT_IMPLICIT_BRIDGING_CONVERSION diff --git a/Tests/NimbleTests/Matchers/SatisfyAnyOfTest.swift b/Tests/NimbleTests/Matchers/SatisfyAnyOfTest.swift index 0cba8d5ca..5413b3d8c 100644 --- a/Tests/NimbleTests/Matchers/SatisfyAnyOfTest.swift +++ b/Tests/NimbleTests/Matchers/SatisfyAnyOfTest.swift @@ -2,7 +2,7 @@ import XCTest import Nimble import Foundation -final class SatisfyAnyOfTest: XCTestCase, XCTestCaseProvider { +final class SatisfyAnyOfTest: XCTestCase { func testSatisfyAnyOf() { expect(2).to(satisfyAnyOf(equal(2), equal(3))) #if SUPPORT_IMPLICIT_BRIDGING_CONVERSION diff --git a/Tests/NimbleTests/Matchers/ThrowAssertionTest.swift b/Tests/NimbleTests/Matchers/ThrowAssertionTest.swift index a1f69cc7f..0741fb659 100644 --- a/Tests/NimbleTests/Matchers/ThrowAssertionTest.swift +++ b/Tests/NimbleTests/Matchers/ThrowAssertionTest.swift @@ -2,20 +2,23 @@ import Foundation import XCTest import Nimble -#if canImport(Darwin) - private let error: Error = NSError(domain: "test", code: 0, userInfo: nil) final class ThrowAssertionTest: XCTestCase { func testPositiveMatch() { + #if canImport(Darwin) expect { () -> Void in fatalError() }.to(throwAssertion()) + #endif } func testErrorThrown() { + #if canImport(Darwin) expect { throw error }.toNot(throwAssertion()) + #endif } func testPostAssertionCodeNotRun() { + #if canImport(Darwin) var reachedPoint1 = false var reachedPoint2 = false @@ -27,17 +30,21 @@ final class ThrowAssertionTest: XCTestCase { expect(reachedPoint1) == true expect(reachedPoint2) == false + #endif } func testNegativeMatch() { + #if canImport(Darwin) var reachedPoint1 = false expect { reachedPoint1 = true }.toNot(throwAssertion()) expect(reachedPoint1) == true + #endif } func testPositiveMessage() { + #if canImport(Darwin) failsWithErrorMessage("expected to throw an assertion") { expect { () -> Void? in return }.to(throwAssertion()) } @@ -45,13 +52,14 @@ final class ThrowAssertionTest: XCTestCase { failsWithErrorMessage("expected to throw an assertion; threw error instead <\(error)>") { expect { throw error }.to(throwAssertion()) } + #endif } func testNegativeMessage() { + #if canImport(Darwin) failsWithErrorMessage("expected to not throw an assertion") { expect { () -> Void in fatalError() }.toNot(throwAssertion()) } + #endif } } - -#endif diff --git a/Tests/NimbleTests/Matchers/ThrowErrorTest.swift b/Tests/NimbleTests/Matchers/ThrowErrorTest.swift index 7a7253fc0..08092cf83 100644 --- a/Tests/NimbleTests/Matchers/ThrowErrorTest.swift +++ b/Tests/NimbleTests/Matchers/ThrowErrorTest.swift @@ -42,7 +42,7 @@ extension CustomDebugStringConvertibleError: CustomDebugStringConvertible { } } -final class ThrowErrorTest: XCTestCase, XCTestCaseProvider { +final class ThrowErrorTest: XCTestCase { func testPositiveMatches() { expect { throw NimbleError.laugh }.to(throwError()) expect { throw NimbleError.laugh }.to(throwError(NimbleError.laugh)) diff --git a/Tests/NimbleTests/Matchers/ToSucceedTest.swift b/Tests/NimbleTests/Matchers/ToSucceedTest.swift index 0079f236e..df6b0aa40 100644 --- a/Tests/NimbleTests/Matchers/ToSucceedTest.swift +++ b/Tests/NimbleTests/Matchers/ToSucceedTest.swift @@ -1,7 +1,7 @@ import XCTest import Nimble -final class ToSucceedTest: XCTestCase, XCTestCaseProvider { +final class ToSucceedTest: XCTestCase { func testToSucceed() { expect({ return .succeeded diff --git a/Tests/NimbleTests/SynchronousTest.swift b/Tests/NimbleTests/SynchronousTest.swift index 1f412dde7..bd05da37b 100644 --- a/Tests/NimbleTests/SynchronousTest.swift +++ b/Tests/NimbleTests/SynchronousTest.swift @@ -2,7 +2,7 @@ import Foundation import XCTest import Nimble -final class SynchronousTest: XCTestCase, XCTestCaseProvider { +final class SynchronousTest: XCTestCase { class Error: Swift.Error {} let errorToThrow = Error() diff --git a/Tests/NimbleTests/UserDescriptionTest.swift b/Tests/NimbleTests/UserDescriptionTest.swift index 0c451c849..fad6d8ec5 100644 --- a/Tests/NimbleTests/UserDescriptionTest.swift +++ b/Tests/NimbleTests/UserDescriptionTest.swift @@ -1,7 +1,7 @@ import XCTest import Nimble -final class UserDescriptionTest: XCTestCase, XCTestCaseProvider { +final class UserDescriptionTest: XCTestCase { func testToMatcher_CustomFailureMessage() { failsWithErrorMessage( """ diff --git a/Tests/NimbleTests/XCTestManifests.swift b/Tests/NimbleTests/XCTestManifests.swift index 2bd105255..55d6d79e5 100644 --- a/Tests/NimbleTests/XCTestManifests.swift +++ b/Tests/NimbleTests/XCTestManifests.swift @@ -1,7 +1,11 @@ +#if !canImport(ObjectiveC) import XCTest extension AllPassTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__AllPassTest = [ ("testAllPassArray", testAllPassArray), ("testAllPassCollectionsWithOptionalsDontWork", testAllPassCollectionsWithOptionalsDontWork), ("testAllPassCollectionsWithOptionalsUnwrappingOneOptionalLayer", testAllPassCollectionsWithOptionalsUnwrappingOneOptionalLayer), @@ -12,7 +16,10 @@ extension AllPassTest { } extension AsyncTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__AsyncTest = [ ("testCombiningAsyncWaitUntilAndToEventuallyIsNotAllowed", testCombiningAsyncWaitUntilAndToEventuallyIsNotAllowed), ("testSubjectUnderTestIsReleasedFromMemory", testSubjectUnderTestIsReleasedFromMemory), ("testToEventuallyMustBeInMainThread", testToEventuallyMustBeInMainThread), @@ -31,21 +38,30 @@ extension AsyncTest { } extension BeAKindOfObjCTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__BeAKindOfObjCTest = [ ("testFailureMessages", testFailureMessages), ("testPositiveMatch", testPositiveMatch), ] } extension BeAKindOfSwiftTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__BeAKindOfSwiftTest = [ ("testFailureMessages", testFailureMessages), ("testPositiveMatch", testPositiveMatch), ] } extension BeAnInstanceOfTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__BeAnInstanceOfTest = [ ("testFailureMessages", testFailureMessages), ("testFailureMessagesSwiftTypes", testFailureMessagesSwiftTypes), ("testPositiveMatch", testPositiveMatch), @@ -54,7 +70,10 @@ extension BeAnInstanceOfTest { } extension BeCloseToTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__BeCloseToTest = [ ("testBeCloseTo", testBeCloseTo), ("testBeCloseToArray", testBeCloseToArray), ("testBeCloseToOperator", testBeCloseToOperator), @@ -72,7 +91,10 @@ extension BeCloseToTest { } extension BeEmptyTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__BeEmptyTest = [ ("testBeEmptyNegative", testBeEmptyNegative), ("testBeEmptyPositive", testBeEmptyPositive), ("testNilMatches", testNilMatches), @@ -80,7 +102,10 @@ extension BeEmptyTest { } extension BeFalseTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__BeFalseTest = [ ("testShouldMatchFalse", testShouldMatchFalse), ("testShouldNotMatchNilBools", testShouldNotMatchNilBools), ("testShouldNotMatchTrue", testShouldNotMatchTrue), @@ -88,7 +113,10 @@ extension BeFalseTest { } extension BeFalsyTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__BeFalsyTest = [ ("testShouldMatchFalse", testShouldMatchFalse), ("testShouldMatchNilBools", testShouldMatchNilBools), ("testShouldMatchNilTypes", testShouldMatchNilTypes), @@ -98,21 +126,30 @@ extension BeFalsyTest { } extension BeGreaterThanOrEqualToTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__BeGreaterThanOrEqualToTest = [ ("testGreaterThanOrEqualTo", testGreaterThanOrEqualTo), ("testGreaterThanOrEqualToOperator", testGreaterThanOrEqualToOperator), ] } extension BeGreaterThanTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__BeGreaterThanTest = [ ("testGreaterThan", testGreaterThan), ("testGreaterThanOperator", testGreaterThanOperator), ] } extension BeIdenticalToObjectTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__BeIdenticalToObjectTest = [ ("testBeIdenticalToNegative", testBeIdenticalToNegative), ("testBeIdenticalToNegativeMessage", testBeIdenticalToNegativeMessage), ("testBeIdenticalToPositive", testBeIdenticalToPositive), @@ -123,7 +160,10 @@ extension BeIdenticalToObjectTest { } extension BeIdenticalToTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__BeIdenticalToTest = [ ("testBeAlias", testBeAlias), ("testBeIdenticalToNegative", testBeIdenticalToNegative), ("testBeIdenticalToNegativeMessage", testBeIdenticalToNegativeMessage), @@ -134,27 +174,39 @@ extension BeIdenticalToTest { } extension BeLessThanOrEqualToTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__BeLessThanOrEqualToTest = [ ("testLessThanOrEqualTo", testLessThanOrEqualTo), ("testLessThanOrEqualToOperator", testLessThanOrEqualToOperator), ] } extension BeLessThanTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__BeLessThanTest = [ ("testLessThan", testLessThan), ("testLessThanOperator", testLessThanOperator), ] } extension BeNilTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__BeNilTest = [ ("testBeNil", testBeNil), ] } extension BeTrueTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__BeTrueTest = [ ("testShouldMatchTrue", testShouldMatchTrue), ("testShouldNotMatchFalse", testShouldNotMatchFalse), ("testShouldNotMatchNilBools", testShouldNotMatchNilBools), @@ -162,7 +214,10 @@ extension BeTrueTest { } extension BeTruthyTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__BeTruthyTest = [ ("testShouldMatchBoolConvertibleTypesThatConvertToTrue", testShouldMatchBoolConvertibleTypesThatConvertToTrue), ("testShouldMatchNonNilTypes", testShouldMatchNonNilTypes), ("testShouldMatchTrue", testShouldMatchTrue), @@ -174,20 +229,29 @@ extension BeTruthyTest { } extension BeVoidTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__BeVoidTest = [ ("testBeVoid", testBeVoid), ] } extension BeginWithTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__BeginWithTest = [ ("testNegativeMatches", testNegativeMatches), ("testPositiveMatches", testPositiveMatches), ] } extension ContainElementSatisfyingTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__ContainElementSatisfyingTest = [ ("testContainElementSatisfying", testContainElementSatisfying), ("testContainElementSatisfyingDefaultErrorMessage", testContainElementSatisfyingDefaultErrorMessage), ("testContainElementSatisfyingNegativeCase", testContainElementSatisfyingNegativeCase), @@ -198,7 +262,10 @@ extension ContainElementSatisfyingTest { } extension ContainTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__ContainTest = [ ("testCollectionArguments", testCollectionArguments), ("testContainObjCSubstring", testContainObjCSubstring), ("testContainSequence", testContainSequence), @@ -210,20 +277,29 @@ extension ContainTest { } extension ElementsEqualTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__ElementsEqualTest = [ ("testSequenceElementsEquality", testSequenceElementsEquality), ] } extension EndWithTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__EndWithTest = [ ("testEndWithNegatives", testEndWithNegatives), ("testEndWithPositives", testEndWithPositives), ] } extension EqualTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__EqualTest = [ ("testArrayEquality", testArrayEquality), ("testArrayOfOptionalsEquality", testArrayOfOptionalsEquality), ("testDataEquality", testDataEquality), @@ -241,7 +317,10 @@ extension EqualTest { } extension HaveCountTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__HaveCountTest = [ ("testHaveCountForArray", testHaveCountForArray), ("testHaveCountForDictionary", testHaveCountForDictionary), ("testHaveCountForSet", testHaveCountForSet), @@ -249,7 +328,10 @@ extension HaveCountTest { } extension MatchErrorTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__MatchErrorTest = [ ("testDoesNotMatchNils", testDoesNotMatchNils), ("testMatchErrorNegative", testMatchErrorNegative), ("testMatchErrorPositive", testMatchErrorPositive), @@ -261,7 +343,10 @@ extension MatchErrorTest { } extension MatchTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__MatchTest = [ ("testMatchNegative", testMatchNegative), ("testMatchNegativeMessage", testMatchNegativeMessage), ("testMatchNils", testMatchNils), @@ -271,7 +356,10 @@ extension MatchTest { } extension PostNotificationTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__PostNotificationTest = [ ("testFailsWhenNoNotificationsArePosted", testFailsWhenNoNotificationsArePosted), ("testFailsWhenNotificationWithWrongNameIsPosted", testFailsWhenNotificationWithWrongNameIsPosted), ("testFailsWhenNotificationWithWrongObjectIsPosted", testFailsWhenNotificationWithWrongObjectIsPosted), @@ -283,21 +371,30 @@ extension PostNotificationTest { } extension SatisfyAllOfTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__SatisfyAllOfTest = [ ("testOperatorAnd", testOperatorAnd), ("testSatisfyAllOf", testSatisfyAllOf), ] } extension SatisfyAnyOfTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__SatisfyAnyOfTest = [ ("testOperatorOr", testOperatorOr), ("testSatisfyAnyOf", testSatisfyAnyOf), ] } extension SynchronousTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__SynchronousTest = [ ("testFailAlwaysFails", testFailAlwaysFails), ("testNotToMatchesLikeToNot", testNotToMatchesLikeToNot), ("testToMatchAgainstLazyProperties", testToMatchAgainstLazyProperties), @@ -315,8 +412,25 @@ extension SynchronousTest { ] } +extension ThrowAssertionTest { + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__ThrowAssertionTest = [ + ("testErrorThrown", testErrorThrown), + ("testNegativeMatch", testNegativeMatch), + ("testNegativeMessage", testNegativeMessage), + ("testPositiveMatch", testPositiveMatch), + ("testPositiveMessage", testPositiveMessage), + ("testPostAssertionCodeNotRun", testPostAssertionCodeNotRun), + ] +} + extension ThrowErrorTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__ThrowErrorTest = [ ("testNegativeMatches", testNegativeMatches), ("testNegativeMatchesDoNotCallClosureWithoutError", testNegativeMatchesDoNotCallClosureWithoutError), ("testNegativeMatchesWithClosure", testNegativeMatchesWithClosure), @@ -328,13 +442,19 @@ extension ThrowErrorTest { } extension ToSucceedTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__ToSucceedTest = [ ("testToSucceed", testToSucceed), ] } extension UserDescriptionTest { - static let __allTests = [ + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__UserDescriptionTest = [ ("testNotToMatcher_CustomFailureMessage", testNotToMatcher_CustomFailureMessage), ("testToEventuallyMatch_CustomFailureMessage", testToEventuallyMatch_CustomFailureMessage), ("testToEventuallyNotMatch_CustomFailureMessage", testToEventuallyNotMatch_CustomFailureMessage), @@ -344,44 +464,44 @@ extension UserDescriptionTest { ] } -#if !os(macOS) public func __allTests() -> [XCTestCaseEntry] { return [ - testCase(AllPassTest.__allTests), - testCase(AsyncTest.__allTests), - testCase(BeAKindOfObjCTest.__allTests), - testCase(BeAKindOfSwiftTest.__allTests), - testCase(BeAnInstanceOfTest.__allTests), - testCase(BeCloseToTest.__allTests), - testCase(BeEmptyTest.__allTests), - testCase(BeFalseTest.__allTests), - testCase(BeFalsyTest.__allTests), - testCase(BeGreaterThanOrEqualToTest.__allTests), - testCase(BeGreaterThanTest.__allTests), - testCase(BeIdenticalToObjectTest.__allTests), - testCase(BeIdenticalToTest.__allTests), - testCase(BeLessThanOrEqualToTest.__allTests), - testCase(BeLessThanTest.__allTests), - testCase(BeNilTest.__allTests), - testCase(BeTrueTest.__allTests), - testCase(BeTruthyTest.__allTests), - testCase(BeVoidTest.__allTests), - testCase(BeginWithTest.__allTests), - testCase(ContainElementSatisfyingTest.__allTests), - testCase(ContainTest.__allTests), - testCase(ElementsEqualTest.__allTests), - testCase(EndWithTest.__allTests), - testCase(EqualTest.__allTests), - testCase(HaveCountTest.__allTests), - testCase(MatchErrorTest.__allTests), - testCase(MatchTest.__allTests), - testCase(PostNotificationTest.__allTests), - testCase(SatisfyAllOfTest.__allTests), - testCase(SatisfyAnyOfTest.__allTests), - testCase(SynchronousTest.__allTests), - testCase(ThrowErrorTest.__allTests), - testCase(ToSucceedTest.__allTests), - testCase(UserDescriptionTest.__allTests), + testCase(AllPassTest.__allTests__AllPassTest), + testCase(AsyncTest.__allTests__AsyncTest), + testCase(BeAKindOfObjCTest.__allTests__BeAKindOfObjCTest), + testCase(BeAKindOfSwiftTest.__allTests__BeAKindOfSwiftTest), + testCase(BeAnInstanceOfTest.__allTests__BeAnInstanceOfTest), + testCase(BeCloseToTest.__allTests__BeCloseToTest), + testCase(BeEmptyTest.__allTests__BeEmptyTest), + testCase(BeFalseTest.__allTests__BeFalseTest), + testCase(BeFalsyTest.__allTests__BeFalsyTest), + testCase(BeGreaterThanOrEqualToTest.__allTests__BeGreaterThanOrEqualToTest), + testCase(BeGreaterThanTest.__allTests__BeGreaterThanTest), + testCase(BeIdenticalToObjectTest.__allTests__BeIdenticalToObjectTest), + testCase(BeIdenticalToTest.__allTests__BeIdenticalToTest), + testCase(BeLessThanOrEqualToTest.__allTests__BeLessThanOrEqualToTest), + testCase(BeLessThanTest.__allTests__BeLessThanTest), + testCase(BeNilTest.__allTests__BeNilTest), + testCase(BeTrueTest.__allTests__BeTrueTest), + testCase(BeTruthyTest.__allTests__BeTruthyTest), + testCase(BeVoidTest.__allTests__BeVoidTest), + testCase(BeginWithTest.__allTests__BeginWithTest), + testCase(ContainElementSatisfyingTest.__allTests__ContainElementSatisfyingTest), + testCase(ContainTest.__allTests__ContainTest), + testCase(ElementsEqualTest.__allTests__ElementsEqualTest), + testCase(EndWithTest.__allTests__EndWithTest), + testCase(EqualTest.__allTests__EqualTest), + testCase(HaveCountTest.__allTests__HaveCountTest), + testCase(MatchErrorTest.__allTests__MatchErrorTest), + testCase(MatchTest.__allTests__MatchTest), + testCase(PostNotificationTest.__allTests__PostNotificationTest), + testCase(SatisfyAllOfTest.__allTests__SatisfyAllOfTest), + testCase(SatisfyAnyOfTest.__allTests__SatisfyAnyOfTest), + testCase(SynchronousTest.__allTests__SynchronousTest), + testCase(ThrowAssertionTest.__allTests__ThrowAssertionTest), + testCase(ThrowErrorTest.__allTests__ThrowErrorTest), + testCase(ToSucceedTest.__allTests__ToSucceedTest), + testCase(UserDescriptionTest.__allTests__UserDescriptionTest), ] } #endif