Files
swift-mirror/test/NameBinding/debug-client-discriminator.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
1.3 KiB
Swift

// RUN: rm -rf %t && mkdir -p %t
// RUN: %target-swift-frontend -emit-module -o %t -module-name HasPrivateAccess %S/Inputs/HasPrivateAccess1.swift %S/Inputs/HasPrivateAccess2.swift
// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -I %t -sdk "" -disable-access-control 2>&1 | FileCheck -check-prefix=CHECK-ERROR %s
// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -I %t -sdk "" -disable-access-control -explode-pattern-binding-decls -debug-client-discriminator _5AB3F657DD2A7E5E793501C5FA480C3D | FileCheck -check-prefix=CHECK-INT %s
// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -I %t -sdk "" -disable-access-control -explode-pattern-binding-decls -debug-client-discriminator _0D6EC78101B0986747C7103C2739A767 | FileCheck -check-prefix=CHECK-STRING %s
import HasPrivateAccess
// CHECK-ERROR: ambiguous use of 'global'
// CHECK-INT: let unqualified: Int
// CHECK-STRING: let unqualified: String
let unqualified = global
// CHECK-ERROR: ambiguous use of 'global'
// CHECK-INT: let qualified: Int
// CHECK-STRING: let qualified: String
let qualified = HasPrivateAccess.global
// CHECK-ERROR: ambiguous use of 'method'
// CHECK-INT: let result: Int?
// CHECK-STRING: let result: String?
let result = HasPrivateAccess.MyStruct.method()