@@ -20,10 +20,8 @@ import Testing
20
20
}
21
21
}
22
22
@Shared ( Key ( ) ) var value = 0
23
- await withKnownIssue {
24
- await #expect( throws: SaveError . self) {
25
- try await $value. save ( )
26
- }
23
+ await #expect( throws: SaveError . self) {
24
+ try await $value. save ( )
27
25
}
28
26
#expect( $value. saveError is SaveError )
29
27
}
@@ -42,12 +40,8 @@ import Testing
42
40
struct LoadError : Error { }
43
41
}
44
42
45
- withKnownIssue {
46
- @SharedReader ( Key ( ) ) var count = 0
47
- #expect( $count. loadError != nil )
48
- } matching: {
49
- $0. description == " Caught error: LoadError() "
50
- }
43
+ @SharedReader ( Key ( ) ) var count = 0
44
+ #expect( $count. loadError != nil )
51
45
}
52
46
53
47
@Test func userInitiatedLoadError( ) async {
@@ -71,12 +65,8 @@ import Testing
71
65
72
66
@SharedReader ( Key ( ) ) var value = 0
73
67
74
- await withKnownIssue {
75
- await #expect( throws: LoadError . self) {
76
- try await $value. load ( )
77
- }
78
- } matching: {
79
- $0. description == " Caught error: LoadError() "
68
+ await #expect( throws: LoadError . self) {
69
+ try await $value. load ( )
80
70
}
81
71
}
82
72
@@ -117,11 +107,7 @@ import Testing
117
107
118
108
let key = Key ( )
119
109
@SharedReader ( key) var count = 0
120
- withKnownIssue {
121
- key. subscriber? . yield ( throwing: Key . LoadError ( ) )
122
- } matching: {
123
- $0. description == " Caught error: LoadError() "
124
- }
110
+ key. subscriber? . yield ( throwing: Key . LoadError ( ) )
125
111
#expect( $count. loadError != nil )
126
112
127
113
key. subscriber? . yield ( 1 )
@@ -147,11 +133,7 @@ import Testing
147
133
}
148
134
149
135
@Shared ( Key ( ) ) var count = 0
150
- withKnownIssue {
151
- $count. withLock { $0 -= 1 }
152
- } matching: {
153
- $0. description == " Caught error: SaveError() "
154
- }
136
+ $count. withLock { $0 -= 1 }
155
137
#expect( $count. saveError != nil )
156
138
157
139
$count. withLock { $0 += 1 }
@@ -180,18 +162,10 @@ import Testing
180
162
181
163
let key = Key ( )
182
164
@Shared ( key) var count = 0
183
- withKnownIssue {
184
- key. subscriber? . yield ( throwing: Key . LoadError ( ) )
185
- } matching: {
186
- $0. description == " Caught error: LoadError() "
187
- }
165
+ key. subscriber? . yield ( throwing: Key . LoadError ( ) )
188
166
#expect( $count. loadError != nil )
189
167
190
- withKnownIssue {
191
- $count. withLock { $0 -= 1 }
192
- } matching: {
193
- $0. description == " Caught error: SaveError() "
194
- }
168
+ $count. withLock { $0 -= 1 }
195
169
#expect( $count. loadError != nil )
196
170
#expect( $count. saveError != nil )
197
171
@@ -200,11 +174,7 @@ import Testing
200
174
#expect( $count. loadError == nil )
201
175
#expect( $count. saveError != nil )
202
176
203
- withKnownIssue {
204
- key. subscriber? . yield ( throwing: Key . LoadError ( ) )
205
- } matching: {
206
- $0. description == " Caught error: LoadError() "
207
- }
177
+ key. subscriber? . yield ( throwing: Key . LoadError ( ) )
208
178
#expect( $count. loadError != nil )
209
179
#expect( $count. saveError != nil )
210
180
@@ -233,9 +203,7 @@ import Testing
233
203
#expect( $count. loadError == nil )
234
204
235
205
struct LoadError : Error { }
236
- withKnownIssue {
237
- key. continuation. withLock { $0? . resume ( throwing: LoadError ( ) ) }
238
- }
206
+ key. continuation. withLock { $0? . resume ( throwing: LoadError ( ) ) }
239
207
240
208
#expect( !$count. isLoading)
241
209
#expect( $count. loadError != nil )
@@ -277,9 +245,7 @@ import Testing
277
245
$count. withLock { $0 += 1 }
278
246
279
247
struct SaveError : Error { }
280
- withKnownIssue {
281
- key. continuation. withLock { $0? . resume ( throwing: SaveError ( ) ) }
282
- }
248
+ key. continuation. withLock { $0? . resume ( throwing: SaveError ( ) ) }
283
249
284
250
#expect( $count. saveError != nil )
285
251
0 commit comments