File tree Expand file tree Collapse file tree 6 files changed +18
-18
lines changed Expand file tree Collapse file tree 6 files changed +18
-18
lines changed Original file line number Diff line number Diff line change 2727#endif
2828
2929class ErrorHandling : XCTestCase {
30- var allTests : [ ( String , ( ) throws -> ( ) ) ] {
30+ static var allTests : [ ( String , ErrorHandling -> ( ) throws -> Void ) ] {
3131 return [
3232 // Tests for XCTAssertThrowsError
3333 ( " test_shouldButDoesNotThrowErrorInAssertion " , test_shouldButDoesNotThrowErrorInAssertion) ,
@@ -39,7 +39,7 @@ class ErrorHandling: XCTestCase {
3939 ( " test_canButDoesNotThrowErrorFromTestMethod " , test_canButDoesNotThrowErrorFromTestMethod) ,
4040
4141 // Tests for throwing assertion expressions
42- ( " test_assertionExpressionCanThrow " , test_assertionExpressionCanThrow) ,
42+ ( " test_assertionExpressionCanThrow " , test_assertionExpressionCanThrow) ,
4343 ]
4444 }
4545
@@ -103,4 +103,4 @@ class ErrorHandling: XCTestCase {
103103 }
104104}
105105
106- XCTMain ( [ ErrorHandling ( ) ] )
106+ XCTMain ( [ testCase ( ErrorHandling . allTests ) ] )
Original file line number Diff line number Diff line change 2222#endif
2323
2424class PassingTestCase : XCTestCase {
25- var allTests : [ ( String , ( ) throws -> ( ) ) ] {
25+ static var allTests : [ ( String , PassingTestCase -> ( ) throws -> Void ) ] {
2626 return [
2727 ( " test_passes " , test_passes) ,
2828 ]
@@ -34,7 +34,7 @@ class PassingTestCase: XCTestCase {
3434}
3535
3636class FailingTestCase : XCTestCase {
37- var allTests : [ ( String , ( ) throws -> ( ) ) ] {
37+ static var allTests : [ ( String , FailingTestCase -> ( ) throws -> Void ) ] {
3838 return [
3939 ( " test_passes " , test_passes) ,
4040 ( " test_fails " , test_fails) ,
@@ -56,6 +56,6 @@ class FailingTestCase: XCTestCase {
5656}
5757
5858XCTMain ( [
59- PassingTestCase ( ) ,
60- FailingTestCase ( ) ,
59+ testCase ( PassingTestCase . allTests ) ,
60+ testCase ( FailingTestCase . allTests ) ,
6161] )
Original file line number Diff line number Diff line change 7878
7979// Regression test for https://github.com/apple/swift-corelibs-xctest/pull/22
8080class FailureMessagesTestCase : XCTestCase {
81- var allTests : [ ( String , ( ) throws -> Void ) ] {
81+ static var allTests : [ ( String , FailureMessagesTestCase -> ( ) throws -> Void ) ] {
8282 return [
8383 ( " testAssert " , testAssert) ,
8484 ( " testAssertEqualOptionals " , testAssertEqualOptionals) ,
@@ -194,4 +194,4 @@ class FailureMessagesTestCase: XCTestCase {
194194 }
195195}
196196
197- XCTMain ( [ FailureMessagesTestCase ( ) ] )
197+ XCTMain ( [ testCase ( FailureMessagesTestCase . allTests ) ] )
Original file line number Diff line number Diff line change 2222
2323// Regression test for https://github.com/apple/swift-corelibs-xctest/pull/7
2424class NegativeAccuracyTestCase : XCTestCase {
25- var allTests : [ ( String , ( ) throws -> ( ) ) ] {
25+ static var allTests : [ ( String , NegativeAccuracyTestCase -> ( ) throws -> Void ) ] {
2626 return [
2727 ( " test_equalWithAccuracy_passes " , test_equalWithAccuracy_passes) ,
2828 ( " test_equalWithAccuracy_fails " , test_equalWithAccuracy_fails) ,
@@ -48,4 +48,4 @@ class NegativeAccuracyTestCase: XCTestCase {
4848 }
4949}
5050
51- XCTMain ( [ NegativeAccuracyTestCase ( ) ] )
51+ XCTMain ( [ testCase ( NegativeAccuracyTestCase . allTests ) ] )
Original file line number Diff line number Diff line change 1414#endif
1515
1616class SingleFailingTestCase : XCTestCase {
17- var allTests : [ ( String , ( ) throws -> ( ) ) ] {
17+ static var allTests : [ ( String , SingleFailingTestCase -> ( ) throws -> Void ) ] {
1818 return [
19- ( " test_fails " , test_fails) ,
19+ ( " test_fails " , test_fails)
2020 ]
2121 }
2222
@@ -25,4 +25,4 @@ class SingleFailingTestCase: XCTestCase {
2525 }
2626}
2727
28- XCTMain ( [ SingleFailingTestCase ( ) ] )
28+ XCTMain ( [ testCase ( SingleFailingTestCase . allTests ) ] )
Original file line number Diff line number Diff line change 2121#endif
2222
2323class SetUpTearDownTestCase : XCTestCase {
24- var allTests : [ ( String , ( ) throws -> Void ) ] {
24+ static var allTests : [ ( String , SetUpTearDownTestCase -> ( ) throws -> Void ) ] {
2525 return [
2626 ( " test_hasValueFromSetUp " , test_hasValueFromSetUp) ,
2727 ]
@@ -47,7 +47,7 @@ class SetUpTearDownTestCase: XCTestCase {
4747}
4848
4949class NewInstanceForEachTestTestCase : XCTestCase {
50- var allTests : [ ( String , ( ) throws -> Void ) ] {
50+ static var allTests : [ ( String , NewInstanceForEachTestTestCase -> ( ) throws -> Void ) ] {
5151 return [
5252 ( " test_hasInitializedValue " , test_hasInitializedValue) ,
5353 ( " test_hasInitializedValueInAnotherTest " , test_hasInitializedValueInAnotherTest) ,
@@ -67,6 +67,6 @@ class NewInstanceForEachTestTestCase: XCTestCase {
6767}
6868
6969XCTMain ( [
70- SetUpTearDownTestCase ( ) ,
71- NewInstanceForEachTestTestCase ( )
70+ testCase ( SetUpTearDownTestCase . allTests ) ,
71+ testCase ( NewInstanceForEachTestTestCase . allTests )
7272] )
You can’t perform that action at this time.
0 commit comments