Skip to content

Commit 40511ba

Browse files
committed
Refactor a couple of tests
Match the format of the spi and package variants of these tests.
1 parent 8ca2348 commit 40511ba

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

test/SourceKit/CodeComplete/complete_docbrief_2.swift

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
1-
// BEGIN Module.swift
1+
// RUN: %empty-directory(%t)
2+
// RUN: %empty-directory(%t/Modules)
3+
// RUN: split-file %s %t
4+
5+
// RUN: %target-swift-frontend \
6+
// RUN: -emit-module \
7+
// RUN: -module-name DocBriefTest \
8+
// RUN: -emit-module-path %t/Modules/DocBriefTest.swiftmodule \
9+
// RUN: -emit-module-doc-path %t/Modules/DocBriefTest.swiftdoc \
10+
// RUN: %t/Module.swift
11+
12+
//--- Module.swift
213
public protocol P {
314
/// This is a doc comment of P.foo
415
///
516
/// Do whatever.
617
func foo()
718
}
819

9-
// BEGIN User.swift
20+
//--- User.swift
1021
import DocBriefTest
1122
struct S: P {
1223
func foo() {}
@@ -16,17 +27,6 @@ func test() {
1627
S().
1728
}
1829

19-
// RUN: %empty-directory(%t)
20-
// RUN: %empty-directory(%t/Modules)
21-
// RUN: %{python} %utils/split_file.py -o %t %s
22-
23-
// RUN: %target-swift-frontend \
24-
// RUN: -emit-module \
25-
// RUN: -module-name DocBriefTest \
26-
// RUN: -emit-module-path %t/Modules/DocBriefTest.swiftmodule \
27-
// RUN: -emit-module-doc-path %t/Modules/DocBriefTest.swiftdoc \
28-
// RUN: %t/Module.swift
29-
3030
// RUN: %sourcekitd-test -req=complete -pos=7:7 %t/User.swift -- %t/User.swift -I %t/Modules -target %target-triple -module-name DocBriefUser | %FileCheck %s -check-prefix=CHECK
3131

3232
// CHECK: {

test/SourceKit/CodeComplete/complete_docbrief_3.swift

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
// BEGIN Module.swift
1+
// RUN: %empty-directory(%t)
2+
// RUN: %empty-directory(%t/Modules)
3+
// RUN: split-file %s %t
4+
5+
// RUN: %target-swift-frontend \
6+
// RUN: -emit-module \
7+
// RUN: -module-name DocBriefTest \
8+
// RUN: -emit-module-path %t/Modules/DocBriefTest.swiftmodule \
9+
// RUN: -emit-module-doc-path %t/Modules/DocBriefTest.swiftdoc \
10+
// RUN: %t/Module.swift
11+
12+
//--- Module.swift
213
public protocol P {
314
/// This is a doc comment of P.foo
415
///
@@ -11,23 +22,12 @@ public struct S: P {
1122
public func foo() {}
1223
}
1324

14-
// BEGIN User.swift
25+
//--- User.swift
1526
import DocBriefTest
1627
func test() {
1728
S().foo()
1829
}
1930

20-
// RUN: %empty-directory(%t)
21-
// RUN: %empty-directory(%t/Modules)
22-
// RUN: %{python} %utils/split_file.py -o %t %s
23-
24-
// RUN: %target-swift-frontend \
25-
// RUN: -emit-module \
26-
// RUN: -module-name DocBriefTest \
27-
// RUN: -emit-module-path %t/Modules/DocBriefTest.swiftmodule \
28-
// RUN: -emit-module-doc-path %t/Modules/DocBriefTest.swiftdoc \
29-
// RUN: %t/Module.swift
30-
3131
// RUN: %sourcekitd-test -req=complete -pos=3:7 %t/User.swift -- %t/User.swift -I %t/Modules -target %target-triple -module-name DocBriefUser | %FileCheck %s -check-prefix=CHECK
3232

3333
// CHECK: {

0 commit comments

Comments
 (0)