Files
swift-mirror/test/ClangModules/Darwin_sdk_test.swift
Graham Batty 83b4384fac Update test flags for linux failures and support.
Also removed the sdk 'feature' in favour of the more specific
objc_interop.

Swift SVN r24856
2015-01-30 21:31:48 +00:00

25 lines
552 B
Swift

// RUN: %target-swift-frontend -parse %s -verify
// REQUIRES: objc_interop
import Darwin
import ObjectiveC
errno = 0
assert(errno == 0)
fork() // expected-error{{'fork()' is unavailable}}
vfork() // expected-error{{'vfork()' is unavailable}}
// Test YES and NO.
let x_YES = YES // expected-error {{'YES' is unavailable: Use 'Bool' value 'true' instead}}
let x_NO = NO // expected-error {{'NO' is unavailable: Use 'Bool' value 'false' instead}}
func test_shadow(flag: Bool) -> Bool {
let YES = true
let NO = false
return flag ? YES : NO
}