mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
17 lines
532 B
Swift
17 lines
532 B
Swift
// RUN: %target-run-simple-swift
|
|
// REQUIRES: executable_test
|
|
// REQUIRES: OS=ios
|
|
|
|
import AssetsLibrary
|
|
|
|
// Test the enumerateGroupsWithTypes overload that accepts UInt32.
|
|
// This should compile and not crash at runtime.
|
|
|
|
let library = ALAssetsLibrary()
|
|
library.enumerateGroupsWithTypes(ALAssetsGroupAll,
|
|
usingBlock: {(group: ALAssetsGroup!, stop: UnsafeMutablePointer<ObjCBool>) -> Void in
|
|
print("Swift usingBlock")},
|
|
failureBlock: {(error: NSError!) -> Void in
|
|
print("Swift failureBlock")})
|
|
|