Files
swift-mirror/test/ParseableInterface/imports-submodule-order.swift
Jordan Rose 1c91dd4933 [ParseableInterface] Include "import Swift" in swiftinterface files (#20935)
Otherwise we've got a problem with modules that use -parse-stdlib but
aren't the stdlib themselves. Ideally we'd /only/ print this in that
case, but we don't have that information at this point in the pipeline
and I'm not sure it would be a good idea to include it in the set of
options we pass through.
2018-11-30 18:07:14 -08:00

24 lines
770 B
Swift

// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path - %s -I %S/Inputs/imports-submodule-order/ | %FileCheck %s
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path - %s -I %S/Inputs/imports-submodule-order/ -D XY | %FileCheck %s
#if XY
@_exported import X.Submodule
@_exported import Y.Submodule
#else
@_exported import Y.Submodule
@_exported import X.Submodule
#endif
// The order below is not alphabetical, just deterministic given a set of
// imports across any number of files and in any order.
// CHECK-NOT: import
// CHECK: import X.Submodule{{$}}
// CHECK-NEXT: import Y.Submodule{{$}}
// CHECK-NEXT: {{^}}import Swift{{$}}
// CHECK-NEXT: import X{{$}}
// CHECK-NEXT: import Y{{$}}
// CHECK-NOT: import