Files
swift-mirror/test/stdlib/AssetsLibrary.swift
Anna Zaks 22b4dcda36 Create an overlay for ALAssetsLibrary:enumerateGroupsWithTypes which accepts ALAssetsGroup types.
This is a case of type mismatch due to the parameter type not being a proper
NS_OPTIONS enum. However, it crashes at runtime on 32 bit, so let's introduce an
overlay while waiting for the proper fix.

Addresses radar://18201112

Swift SVN r21957
2014-09-15 22:10:51 +00:00

16 lines
507 B
Swift

// RUN: %target-run-simple-swift
// 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
println("Swift usingBlock")},
failureBlock: {(error: NSError!) -> Void in
println("Swift failureBlock")})