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 27
27
#endif
28
28
29
29
class ErrorHandling : XCTestCase {
30
- var allTests : [ ( String , ( ) throws -> ( ) ) ] {
30
+ static var allTests : [ ( String , ErrorHandling -> ( ) throws -> Void ) ] {
31
31
return [
32
32
// Tests for XCTAssertThrowsError
33
33
( " test_shouldButDoesNotThrowErrorInAssertion " , test_shouldButDoesNotThrowErrorInAssertion) ,
@@ -39,7 +39,7 @@ class ErrorHandling: XCTestCase {
39
39
( " test_canButDoesNotThrowErrorFromTestMethod " , test_canButDoesNotThrowErrorFromTestMethod) ,
40
40
41
41
// Tests for throwing assertion expressions
42
- ( " test_assertionExpressionCanThrow " , test_assertionExpressionCanThrow) ,
42
+ ( " test_assertionExpressionCanThrow " , test_assertionExpressionCanThrow) ,
43
43
]
44
44
}
45
45
@@ -103,4 +103,4 @@ class ErrorHandling: XCTestCase {
103
103
}
104
104
}
105
105
106
- XCTMain ( [ ErrorHandling ( ) ] )
106
+ XCTMain ( [ testCase ( ErrorHandling . allTests ) ] )
Original file line number Diff line number Diff line change 22
22
#endif
23
23
24
24
class PassingTestCase : XCTestCase {
25
- var allTests : [ ( String , ( ) throws -> ( ) ) ] {
25
+ static var allTests : [ ( String , PassingTestCase -> ( ) throws -> Void ) ] {
26
26
return [
27
27
( " test_passes " , test_passes) ,
28
28
]
@@ -34,7 +34,7 @@ class PassingTestCase: XCTestCase {
34
34
}
35
35
36
36
class FailingTestCase : XCTestCase {
37
- var allTests : [ ( String , ( ) throws -> ( ) ) ] {
37
+ static var allTests : [ ( String , FailingTestCase -> ( ) throws -> Void ) ] {
38
38
return [
39
39
( " test_passes " , test_passes) ,
40
40
( " test_fails " , test_fails) ,
@@ -56,6 +56,6 @@ class FailingTestCase: XCTestCase {
56
56
}
57
57
58
58
XCTMain ( [
59
- PassingTestCase ( ) ,
60
- FailingTestCase ( ) ,
59
+ testCase ( PassingTestCase . allTests ) ,
60
+ testCase ( FailingTestCase . allTests ) ,
61
61
] )
Original file line number Diff line number Diff line change 78
78
79
79
// Regression test for https://github.com/apple/swift-corelibs-xctest/pull/22
80
80
class FailureMessagesTestCase : XCTestCase {
81
- var allTests : [ ( String , ( ) throws -> Void ) ] {
81
+ static var allTests : [ ( String , FailureMessagesTestCase -> ( ) throws -> Void ) ] {
82
82
return [
83
83
( " testAssert " , testAssert) ,
84
84
( " testAssertEqualOptionals " , testAssertEqualOptionals) ,
@@ -194,4 +194,4 @@ class FailureMessagesTestCase: XCTestCase {
194
194
}
195
195
}
196
196
197
- XCTMain ( [ FailureMessagesTestCase ( ) ] )
197
+ XCTMain ( [ testCase ( FailureMessagesTestCase . allTests ) ] )
Original file line number Diff line number Diff line change 22
22
23
23
// Regression test for https://github.com/apple/swift-corelibs-xctest/pull/7
24
24
class NegativeAccuracyTestCase : XCTestCase {
25
- var allTests : [ ( String , ( ) throws -> ( ) ) ] {
25
+ static var allTests : [ ( String , NegativeAccuracyTestCase -> ( ) throws -> Void ) ] {
26
26
return [
27
27
( " test_equalWithAccuracy_passes " , test_equalWithAccuracy_passes) ,
28
28
( " test_equalWithAccuracy_fails " , test_equalWithAccuracy_fails) ,
@@ -48,4 +48,4 @@ class NegativeAccuracyTestCase: XCTestCase {
48
48
}
49
49
}
50
50
51
- XCTMain ( [ NegativeAccuracyTestCase ( ) ] )
51
+ XCTMain ( [ testCase ( NegativeAccuracyTestCase . allTests ) ] )
Original file line number Diff line number Diff line change 14
14
#endif
15
15
16
16
class SingleFailingTestCase : XCTestCase {
17
- var allTests : [ ( String , ( ) throws -> ( ) ) ] {
17
+ static var allTests : [ ( String , SingleFailingTestCase -> ( ) throws -> Void ) ] {
18
18
return [
19
- ( " test_fails " , test_fails) ,
19
+ ( " test_fails " , test_fails)
20
20
]
21
21
}
22
22
@@ -25,4 +25,4 @@ class SingleFailingTestCase: XCTestCase {
25
25
}
26
26
}
27
27
28
- XCTMain ( [ SingleFailingTestCase ( ) ] )
28
+ XCTMain ( [ testCase ( SingleFailingTestCase . allTests ) ] )
Original file line number Diff line number Diff line change 21
21
#endif
22
22
23
23
class SetUpTearDownTestCase : XCTestCase {
24
- var allTests : [ ( String , ( ) throws -> Void ) ] {
24
+ static var allTests : [ ( String , SetUpTearDownTestCase -> ( ) throws -> Void ) ] {
25
25
return [
26
26
( " test_hasValueFromSetUp " , test_hasValueFromSetUp) ,
27
27
]
@@ -47,7 +47,7 @@ class SetUpTearDownTestCase: XCTestCase {
47
47
}
48
48
49
49
class NewInstanceForEachTestTestCase : XCTestCase {
50
- var allTests : [ ( String , ( ) throws -> Void ) ] {
50
+ static var allTests : [ ( String , NewInstanceForEachTestTestCase -> ( ) throws -> Void ) ] {
51
51
return [
52
52
( " test_hasInitializedValue " , test_hasInitializedValue) ,
53
53
( " test_hasInitializedValueInAnotherTest " , test_hasInitializedValueInAnotherTest) ,
@@ -67,6 +67,6 @@ class NewInstanceForEachTestTestCase: XCTestCase {
67
67
}
68
68
69
69
XCTMain ( [
70
- SetUpTearDownTestCase ( ) ,
71
- NewInstanceForEachTestTestCase ( )
70
+ testCase ( SetUpTearDownTestCase . allTests ) ,
71
+ testCase ( NewInstanceForEachTestTestCase . allTests )
72
72
] )
You can’t perform that action at this time.
0 commit comments