Files
swift-mirror/test/Interpreter/SDK/objc_ns_enum.swift
Slava Pestov 5d2752f7d2 Run tests with -swift-version 4 by default
Some test now fail, so add an explicit -swift-version 3.
2018-06-19 23:24:19 -07:00

25 lines
621 B
Swift

// RUN: %target-run-simple-swift-swift3
// REQUIRES: executable_test
// NSButtonType (from AppKit) and UIViewAnimationCurve (from UIKit) both have
// private enumerators, so we preserve their values through raw value
// conversion operations.
// (Really we do this for all NS_ENUMs, though we reserve the right to do
// strict checking if we get a guarantee that certain types don't have
// hidden or future enumeration values.)
#if os(macOS)
import AppKit
print(NSButtonType(rawValue: 20721)!.rawValue)
#endif
#if os(iOS)
import UIKit
print(UIViewAnimationCurve(rawValue: 20721)!.rawValue)
#endif
// CHECK: 20721