Files
swift-mirror/test/SourceKit/CodeComplete/injected_vfs_swiftinterface.swift
Daniel Rodríguez Troitiño a1a891e47a [windows] Use the temporal directory for root of VFS tests.
The VFS tests were using Unix absolute paths, which does not play well
when Windows see them as relative to the current drive letter.

By using the temporal directory, both Windows and Unix can use the same
paths and avoid the problem.

Additionally, a couple of inputs have to be transformed into the native
path format, because sourcekitd-test compares the inputs as strings, and
they need to match exactly. So the source file and the name of the VFS
entries are transformed into native using the helper from LLVM support.
2019-11-15 15:20:01 -08:00

14 lines
699 B
Swift

import SwiftModule
func foo(
_ structDefinedInSwiftModule: StructDefinedInSwiftModule
) {
structDefinedInSwiftModule.
}
// CHECK: key.name: "methodDefinedInSwiftModule()"
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module-interface-path %t/SwiftModule.swiftinterface -module-name SwiftModule -emit-module -o /dev/null %S/../Inputs/vfs/SwiftModule/SwiftModule.swift
// RUN: %sourcekitd-test -req=complete -pos=6:31 -vfs-files=%t/VFS/target_file1.swift=%s,%t/VFS/SwiftModule/SwiftModule.swiftinterface=%t/SwiftModule.swiftinterface %t/VFS/target_file1.swift -pass-as-sourcetext -- %t/VFS/target_file1.swift -I %t/VFS/SwiftModule -target %target-triple | %FileCheck %s