Files
swift-mirror/test/ClangModules/uikit_hacks.swift
Dmitri Hrybenko 3b04d1b013 tests: reorganize tests so that they actually use the target platform
Most tests were using %swift or similar substitutions, which did not
include the target triple and SDK.  The driver was defaulting to the
host OS.  Thus, we could not run the tests when the standard library was
not built for OS X.

Swift SVN r24504
2015-01-19 06:52:49 +00:00

24 lines
835 B
Swift

// RUN: %target-swift-frontend -parse -verify %s
// REQUIRES: OS=ios
// FIXME: this test could use the %clang-importer-sdk, but swift tries to
// deserialize the real UIKit module and match it up with the mock SDK, and
// crashes. Another reason to stop using source imports.
import UIKit
// Check that we drop the variadic parameter from certain UIKit initializers.
func makeAnActionSheet() -> UIActionSheet {
return UIActionSheet(title: "Error",
delegate: nil,
cancelButtonTitle: "Cancel",
destructiveButtonTitle: "OK")
}
func makeAnAlertView() -> UIAlertView {
return UIAlertView(title: "Error",
message: "The operation completed successfully.",
delegate: nil,
cancelButtonTitle: "Abort")
}