Files
swift-mirror/test/SourceKit/Indexing/index_with_swift_module.swift
Argyrios Kyrtzidis 8ff6a98a99 [sourcekit] Merge SourceKit into the Swift repo.
The code goes into its own sub-tree under 'tools' but tests go under 'test',
so that running 'check-swift' will also run all the SourceKit tests.

SourceKit is disabled on non-darwin platforms.
2015-11-05 01:09:08 -08:00

28 lines
909 B
Swift

// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: %swift -emit-module -o %t/test_module.swiftmodule %S/Inputs/test_module.swift
// RUN: %sourcekitd-test -req=index %s -- %s -I %t | FileCheck %s
// RUN: %sourcekitd-test -req=index %t/test_module.swiftmodule | %sed_clean > %t.response
// RUN: diff -u %S/Inputs/test_module.index.response %t.response
import test_module
func foo(a: TwoInts) {
}
// CHECK: key.kind: source.lang.swift.import.module.swift
// CHECK-NEXT: key.name: "Swift"
// CHECK-NEXT: key.filepath: "{{.*[/\\]}}Swift.swiftmodule"
// CHECK-NEXT: key.hash:
// CHECK: key.kind: source.lang.swift.import.module.swift
// CHECK-NEXT: key.name: "test_module"
// CHECK-NEXT: key.filepath: "{{.*[/\\]}}test_module.swiftmodule"
// CHECK-NEXT: key.hash:
// CHECK: key.kind: source.lang.swift.ref.class
// CHECK-NEXT: key.name: "TwoInts"
// CHECK-NEXT: key.usr: "s:C11test_module7TwoInts"