Skip to content

Commit 09bd88d

Browse files
committed
SourceKit: add test for attributed imports in generated interfaces
1 parent 8799680 commit 09bd88d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// RUN: %empty-directory(%t)
2+
3+
// RUN: echo 'public func module1() {}' >> %t/module1.swift
4+
// RUN: echo 'public func module2() {}' >> %t/module2.swift
5+
// RUN: %target-swift-frontend -emit-module -module-name Module1 -o %t %t/module1.swift
6+
// RUN: %target-swift-frontend -emit-module -module-name Module2 -o %t %t/module2.swift
7+
8+
// RUN: %target-swift-frontend -I %t -emit-module -o %t/AttrImports.swiftmodule %S/print_attributed_imports.swift
9+
// RUN: %target-swift-ide-test -I %t -print-module -source-filename %s -module-to-print=AttrImports | %FileCheck %s
10+
11+
@_exported import Module1
12+
@_implementationOnly import Module2
13+
14+
// CHECK: import Module1
15+
// CHECK-NOT: import Module2

0 commit comments

Comments
 (0)