@@ -43,7 +43,7 @@ final class AsyncExpectationTests: XCTestCase {
43
43
try await Task . sleep ( seconds: delay)
44
44
await done. fulfill ( )
45
45
}
46
- try await waitForExpectations ( [ done] )
46
+ await waitForExpectations ( [ done] )
47
47
}
48
48
49
49
func testDoneMultipleTimesExpectation( ) async throws {
@@ -61,7 +61,7 @@ final class AsyncExpectationTests: XCTestCase {
61
61
try await Task . sleep ( seconds: delay)
62
62
await done. fulfill ( )
63
63
}
64
- try await waitForExpectations ( [ done] )
64
+ await waitForExpectations ( [ done] )
65
65
}
66
66
67
67
func testNotDoneInvertedExpectation( ) async throws {
@@ -73,7 +73,7 @@ final class AsyncExpectationTests: XCTestCase {
73
73
}
74
74
// cancel immediately to prevent fulfill from being run
75
75
task. cancel ( )
76
- try await waitForExpectations ( [ notDone] , timeout: delay * 2 )
76
+ await waitForExpectations ( [ notDone] , timeout: delay * 2 )
77
77
}
78
78
79
79
func testNotYetDoneAndThenDoneExpectation( ) async throws {
@@ -88,9 +88,9 @@ final class AsyncExpectationTests: XCTestCase {
88
88
await done. fulfill ( ) // will be called after cancellation
89
89
}
90
90
91
- try await waitForExpectations ( [ notYetDone] , timeout: delay)
91
+ await waitForExpectations ( [ notYetDone] , timeout: delay)
92
92
task. cancel ( )
93
- try await waitForExpectations ( [ done] )
93
+ await waitForExpectations ( [ done] )
94
94
}
95
95
96
96
func testDoneAndNotDoneInvertedExpectation( ) async throws {
@@ -107,8 +107,8 @@ final class AsyncExpectationTests: XCTestCase {
107
107
// cancel immediately to prevent fulfill from being run
108
108
task. cancel ( )
109
109
}
110
- try await waitForExpectations ( [ notDone] , timeout: delay * 2 )
111
- try await waitForExpectations ( [ done] )
110
+ await waitForExpectations ( [ notDone] , timeout: delay * 2 )
111
+ await waitForExpectations ( [ done] )
112
112
}
113
113
114
114
func testMultipleFulfilledExpectation( ) async throws {
@@ -128,7 +128,7 @@ final class AsyncExpectationTests: XCTestCase {
128
128
try await Task . sleep ( seconds: delay)
129
129
await three. fulfill ( )
130
130
}
131
- try await waitForExpectations ( [ one, two, three] )
131
+ await waitForExpectations ( [ one, two, three] )
132
132
}
133
133
134
134
func testMultipleAlreadyFulfilledExpectation( ) async throws {
@@ -139,7 +139,7 @@ final class AsyncExpectationTests: XCTestCase {
139
139
await two. fulfill ( )
140
140
await three. fulfill ( )
141
141
142
- try await waitForExpectations ( [ one, two, three] )
142
+ await waitForExpectations ( [ one, two, three] )
143
143
}
144
144
145
145
}
0 commit comments