@@ -218,38 +218,6 @@ suite.test("InlineArray initialization underflow")
218
218
}
219
219
}
220
220
221
- #if false
222
- suite. test ( " InlineArray initialization throws 0 " )
223
- . require ( . stdlib_6_2) . code {
224
- guard #available( SwiftStdlib 6 . 2 , * ) else { return }
225
-
226
- enum LocalError : Error { case error }
227
-
228
- class I {
229
- static public var count = 0
230
- init ( ) { Self . count += 1 }
231
- deinit { Self . count -= 1 }
232
- }
233
-
234
- let a : InlineArray < 4 , I >
235
- do throws ( LocalError) {
236
- var c = 1
237
- a = try InlineArray ( first: I ( ) ) {
238
- i throws ( LocalError) in
239
- c += 1
240
- if c < 4 {
241
- return I ( )
242
- }
243
- print ( I . count)
244
- throw LocalError . error
245
- }
246
- _ = a
247
- } catch {
248
- print ( error, I . count)
249
- expectEqual ( I . count, 0 )
250
- }
251
- }
252
-
253
221
suite. test ( " InlineArray initialization throws " )
254
222
. require ( . stdlib_6_2) . code {
255
223
guard #available( SwiftStdlib 6 . 2 , * ) else { return }
@@ -271,26 +239,10 @@ suite.test("InlineArray initialization throws")
271
239
o. append ( I ( ) )
272
240
o. append ( I ( ) )
273
241
expectEqual ( I . count, 4 )
274
- print ( I . count)
275
242
throw LocalError . error
276
243
}
277
244
_ = a
278
245
} catch {
279
- print ( error, I . count)
280
246
expectEqual ( I . count, 0 )
281
247
}
282
248
}
283
- #endif
284
-
285
- suite. test ( " InlineArray consumed " )
286
- . require ( . stdlib_6_2) . code {
287
- guard #available( SwiftStdlib 6 . 2 , * ) else { return }
288
-
289
- let a : InlineArray < 4 , Int > = [ 1 , 2 , 3 , 4 ]
290
- let b = Array ( capacity: 20 , initializingWith: {
291
- $0. append ( consuming: a)
292
- } )
293
- expectEqual ( a. count, b. count)
294
- let i = a. indices. randomElement ( ) !
295
- expectEqual ( b [ i] , a [ i] )
296
- }
0 commit comments