Files
swift-mirror/test/SourceKit/Indexing/index_with_clang_module.swift
Brian Croom 98e3ca8bc4 Annotate some SourceKit tests that fail on Linux.
* A bunch of them require objc_interop because they import code containing
  Objective-C.
* Many others fail on Ubuntu 14.04 because the C++ there doesn't have a
  functional std::regex implementation which is required by the
  `complete-test` tool.

It may be possible to adjust some of these tests in the future to not
need these extra requirements, but this is a straightforward way to
clean up Linux test results for now.
2016-06-14 08:55:48 -04:00

28 lines
905 B
Swift

// REQUIRES: objc_interop
// RUN: %sourcekitd-test -req=index %s -- %s -F %S/../Inputs/libIDE-mock-sdk \
// RUN: %mcp_opt %clang-importer-sdk | FileCheck %s
import Foo
func foo(a: FooClassDerived) {
a.fooInstanceFunc0()
fooFunc1(0)
}
// CHECK: key.kind: source.lang.swift.import.module.clang
// CHECK-NEXT: key.name: "Foo"
// CHECK-NEXT: key.filepath: "{{.*[/\\]}}Foo{{.*}}.pcm"
// CHECK-NOT: key.hash:
// CHECK: key.kind: source.lang.swift.ref.class
// CHECK-NEXT: key.name: "FooClassDerived"
// CHECK-NEXT: key.usr: "c:objc(cs)FooClassDerived"
// CHECK: key.kind: source.lang.swift.ref.function.method.instance
// CHECK-NEXT: key.name: "fooInstanceFunc0()"
// CHECK-NEXT: key.usr: "c:objc(cs)FooClassDerived(im)fooInstanceFunc0"
// CHECK: key.kind: source.lang.swift.ref.function.free
// CHECK-NEXT: key.name: "fooFunc1(_:)"
// CHECK-NEXT: key.usr: "c:@F@fooFunc1"