Skip to content

Commit d176bfa

Browse files
committed
[test] Move tests that only test the Frontend out of Driver/
Reorganization only.
1 parent b88256e commit d176bfa

13 files changed

+18
-9
lines changed

test/Driver/Inputs/lib.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// Used by multiple_input.swift and emit-objc-header.swift tests.
1+
// Used by emit-objc-header.swift and others.
22

33
func libraryFunction() {}

test/Driver/Inputs/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// Used by multiple_input.swift and emit-objc-header.swift tests. This file
2-
// should be inferred as the main source file from its name.
1+
// Used by emit-objc-header.swift and others.
2+
// This file should be inferred as the main source file from its name.
33

44
var x = 4 + 5
55
print(x)

test/Driver/multiple_input.swift

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
func libraryFunction() {}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// This file should be inferred as the main source file from its name.
2+
3+
var x = 4 + 5
4+
print(x)
5+
6+
// Check implicit visibility.
7+
libraryFunction()
8+
ThisModule.libraryFunction()
File renamed without changes.
File renamed without changes.

test/Frontend/multiple_input.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// RUN: %target-swift-frontend -typecheck %S/Inputs/multiple_input/main.swift %S/Inputs/multiple_input/lib.swift %s -module-name ThisModule
2+
// RUN: %target-swift-frontend -typecheck %s %S/Inputs/multiple_input/lib.swift %S/Inputs/multiple_input/main.swift -module-name ThisModule
3+
4+
// RUN: not %target-swift-frontend -typecheck -parse-as-library %S/Inputs/multiple_input/main.swift %S/Inputs/multiple_input/lib.swift %s 2>&1 | %FileCheck %s
5+
// CHECK: main.swift:
6+
// CHECK: expressions are not allowed at the top level
File renamed without changes.

0 commit comments

Comments
 (0)