Files
swift-mirror/test/ModuleInterface/imports-submodule-order.swift
David Zarzycki 654234ad64 [Testing] Unbreak minimal Swift builds
For various reasons, it can be useful/interesting to create builds of
Swift that minimize dependencies. Let's try to keep that working as long
as we can.
2021-04-16 17:39:01 -04:00

24 lines
838 B
Swift

// RUN: %target-swift-frontend -disable-implicit-concurrency-module-import -typecheck -emit-module-interface-path - %s -I %S/Inputs/imports-submodule-order/ | %FileCheck %s
// RUN: %target-swift-frontend -disable-implicit-concurrency-module-import -typecheck -emit-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