Skip to content

Commit 5331763

Browse files
committed
[Tests] Pre split test files
split_files.py changes the newline characters depending on the platform
1 parent 4e39111 commit 5331763

File tree

3 files changed

+10
-16
lines changed

3 files changed

+10
-16
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
public func foo(val: MyStruct) {
2+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public struct MyStruct {
2+
var x: Int
3+
var y: Int
4+
}

test/Serialization/sourceinfo.swift

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
1-
// BEGIN File1.swift
2-
public func foo(val: MyStruct) {
3-
}
4-
5-
// BEGIN File2.swift
6-
public struct MyStruct {
7-
var x: Int
8-
var y: Int
9-
}
10-
11-
// BEGIN DUMMY.swift
121
import MyModule
132

143
// RUN: %empty-directory(%t)
154
// RUN: %empty-directory(%t/Modules)
16-
// RUN: %{python} %utils/split_file.py -o %t %s
175

18-
// RUN: %target-swiftc_driver -emit-module -module-name MyModule -o %t/Modules/MyModule.swiftmodule %t/File1.swift %t/File2.swift
19-
// RUN: %swift-ide-test -print-module-metadata -module-to-print MyModule -enable-swiftsourceinfo -I %t/Modules -source-filename %t/DUMMY.swift | %FileCheck %s
6+
// RUN: %target-swiftc_driver -emit-module -module-name MyModule -o %t/Modules/MyModule.swiftmodule %S/Inputs/SourceInfo/File1.swift %S/Inputs/SourceInfo/File2.swift
7+
// RUN: %target-swift-ide-test -print-module-metadata -module-to-print MyModule -enable-swiftsourceinfo -I %t/Modules -source-filename %s | %FileCheck %s
208

21-
// CHECK: filepath=BUILD_DIR/{{.*}}/File1.swift; hash=b44bab617797a7239a9fa948f11eb90b; mtime={{[0-9]{4}-[0-9]{2}-[0-9]{2} .*}}; size=36
22-
// CHECK: filepath=BUILD_DIR/{{.*}}/File2.swift; hash=c989d6b98d505a1f52749d43ea0569a1; mtime={{[0-9]{4}-[0-9]{2}-[0-9]{2} .*}}; size=58
9+
// CHECK: filepath=SOURCE_DIR{{[/\\]}}test{{[/\\]}}Serialization{{[/\\]}}Inputs{{[/\\]}}SourceInfo{{[/\\]}}File1.swift; hash=b44bab617797a7239a9fa948f11eb90b; mtime={{[0-9]{4}-[0-9]{2}-[0-9]{2} .*}}; size=35
10+
// CHECK: filepath=SOURCE_DIR{{[/\\]}}test{{[/\\]}}Serialization{{[/\\]}}Inputs{{[/\\]}}SourceInfo{{[/\\]}}File2.swift; hash=c989d6b98d505a1f52749d43ea0569a1; mtime={{[0-9]{4}-[0-9]{2}-[0-9]{2} .*}}; size=57

0 commit comments

Comments
 (0)