File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ /// Test -emit-imported-modules with module aliasing.
2
+ ///
3
+
4
+ // RUN: %empty-directory(%t)
5
+ // RUN: %{python} %utils/split_file.py -o %t %s
6
+
7
+ /// Create AppleLogging.swiftmodule by aliasing XLogging
8
+ // RUN: %target-swift-frontend -module-name AppleLogging -module-alias XLogging=AppleLogging %t/FileLogging.swift -emit-module -emit-module-path %t/AppleLogging.swiftmodule
9
+ // RUN: test -f %t/AppleLogging.swiftmodule
10
+
11
+ /// Verify emitted imported modules contains AppleLogging as a module name
12
+ // RUN: %target-swift-frontend -emit-imported-modules %t/FileLib.swift -module-alias XLogging=AppleLogging -I %t > %t/result.output
13
+
14
+ // RUN: %FileCheck %s -input-file %t/result.output -check-prefix CHECK-AST
15
+ // CHECK-AST: AppleLogging
16
+ // RUN: not %FileCheck %s -input-file %t/result.output -check-prefix CHECK-NOT-AST
17
+ // CHECK-NOT-AST: XLogging
18
+
19
+
20
+ // BEGIN FileLogging.swift
21
+ public struct Logger {
22
+ public init ( ) { }
23
+ }
24
+ public func setup( ) -> XLogging . Logger ? {
25
+ return Logger ( )
26
+ }
27
+
28
+ // BEGIN FileLib.swift
29
+ import XLogging
30
+
31
+ public func start( ) -> XLogging . Logger ? {
32
+ return XLogging . setup ( )
33
+ }
34
+
35
+ public func end( _ arg: XLogging . Logger ) {
36
+ }
37
+
You can’t perform that action at this time.
0 commit comments