@@ -11,10 +11,10 @@ import Accelerate
11
11
var Accelerate_vImageTests = TestSuite ( " Accelerate_vImage " )
12
12
13
13
if #available( iOS 9999 , macOS 9999 , tvOS 9999 , watchOS 9999 , * ) {
14
- let width = UInt ( 48 )
15
- let height = UInt ( 12 )
16
- let widthi = 48
17
- let heighti = 12
14
+ let width = UInt ( 64 )
15
+ let height = UInt ( 32 )
16
+ let widthi = 64
17
+ let heighti = 32
18
18
19
19
//===----------------------------------------------------------------------===//
20
20
//
@@ -269,15 +269,17 @@ if #available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *) {
269
269
var destination = try ! vImage_Buffer ( width: 20 , height: 20 , bitsPerPixel: 32 )
270
270
271
271
expectCrashLater ( )
272
- try ! source. copy ( destinationBuffer: & destination)
272
+ try ! source. copy ( destinationBuffer: & destination,
273
+ pixelSize: 4 )
273
274
}
274
275
275
276
Accelerate_vImageTests . test ( " vImage/CopyBadHeight " ) {
276
277
var source = try ! vImage_Buffer ( width: 100 , height: 10 , bitsPerPixel: 32 )
277
278
var destination = try ! vImage_Buffer ( width: 20 , height: 20 , bitsPerPixel: 32 )
278
279
279
280
expectCrashLater ( )
280
- try ! source. copy ( destinationBuffer: & destination)
281
+ try ! source. copy ( destinationBuffer: & destination,
282
+ pixelSize: 4 )
281
283
}
282
284
283
285
Accelerate_vImageTests . test ( " vImage/Copy " ) {
@@ -294,7 +296,8 @@ if #available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *) {
294
296
var destination = try ! vImage_Buffer ( width: widthi, height: heighti,
295
297
bitsPerPixel: 32 )
296
298
297
- try ! source. copy ( destinationBuffer: & destination)
299
+ try ! source. copy ( destinationBuffer: & destination,
300
+ pixelSize: 4 )
298
301
299
302
let sourcePixels : [ UInt8 ] = arrayFromBuffer ( buffer: source,
300
303
count: pixels. count)
@@ -306,7 +309,7 @@ if #available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *) {
306
309
source. free ( )
307
310
destination. free ( )
308
311
}
309
-
312
+
310
313
Accelerate_vImageTests . test ( " vImage/InitializeWithFormat " ) {
311
314
let pixels : [ UInt8 ] = ( 0 ..< width * height * 4 ) . map { _ in
312
315
return UInt8 . random ( in: 0 ..< 255 )
0 commit comments