forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcursor_swiftonly_systemmodule.swift
40 lines (33 loc) · 1.23 KB
/
cursor_swiftonly_systemmodule.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// BEGIN SomeModule.swift
/// Doc comment for 'someFunc()'
public func someFunc() {}
// BEGIN main.swift
import SomeModule
func test() {
someFunc()
}
// RUN: %empty-directory(%t)
// RUN: %{python} %utils/split_file.py -o %t %s
// RUN: mkdir -p %t/SDK/Frameworks/SomeModule.framework/Modules/SomeModule.swiftmodule
// RUN: %target-swift-frontend \
// RUN: -emit-module \
// RUN: -module-name SomeModule \
// RUN: -o %t/SDK/Frameworks/SomeModule.framework/Modules/SomeModule.swiftmodule/%module-target-triple.swiftmodule \
// RUN: -swift-version 5 \
// RUN: %t/SomeModule.swift
// RUN: %sourcekitd-test -req=cursor -pos=4:3 %t/main.swift -- \
// RUN: -sdk %t/SDK \
// RUN: -Fsystem %t/SDK/Frameworks \
// RUN: -target %target-triple \
// RUN: %t/main.swift \
// RUN: | %FileCheck %s
// CHECK: source.lang.swift.ref.function.free ()
// CHECK-NEXT: someFunc()
// CHECK-NEXT: s:10SomeModule8someFuncyyF
// CHECK-NEXT: source.lang.swift
// CHECK-NEXT: () -> ()
// CHECK-NEXT: $syycD
// CHECK-NEXT: SomeModule
// CHECK-NEXT: SYSTEM
// CHECK-NEXT: <Declaration>func someFunc()</Declaration>
// CHECK-NEXT: <decl.function.free><syntaxtype.keyword>func</syntaxtype.keyword> <decl.name>someFunc</decl.name>()</decl.function.free>