mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.
11 lines
629 B
Swift
11 lines
629 B
Swift
func foo(_ structDefinedInSameTarget: StructDefinedInSameTarget) {
|
|
let _: Double = structDefinedInSameTarget.methodDefinedInSameTarget()
|
|
// CHECK: cannot convert value of type '()' to specified type 'Double'
|
|
// CHECK: cannot convert value of type '()' to specified type 'Int'
|
|
}
|
|
|
|
// RUN: %sourcekitd-test -req=open -vfs-files=%t/VFS/target_file2.swift=%S/../Inputs/vfs/other_file_in_target.swift %s -pass-as-sourcetext -- %s %t/VFS/target_file2.swift -target %target-triple == \
|
|
// RUN: -req=print-diags %s == \
|
|
// RUN: -req=edit %s -pos=2:12 -length=6 -replace='Int' == \
|
|
// RUN: -req=print-diags %s | %FileCheck %s
|