Skip to content

Commit 3e37452

Browse files
committed
NFC: Use split-file in the inconsistent-implementation-only test case instead of auxiliary files to make it easier to see the whole test at once.
1 parent a67c7f7 commit 3e37452

File tree

3 files changed

+31
-19
lines changed

3 files changed

+31
-19
lines changed

test/decl/import/Inputs/inconsistent-implementation-only/2.swift

Lines changed: 0 additions & 8 deletions
This file was deleted.

test/decl/import/Inputs/inconsistent-implementation-only/3.swift

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: split-file %s %t
3+
14
// Check that the diagnostics are produced regardless of what primary file we're using.
2-
// RUN: %target-swift-frontend -typecheck -primary-file %s %S/Inputs/inconsistent-implementation-only/2.swift %S/Inputs/inconsistent-implementation-only/3.swift -I %S/Inputs/inconsistent-implementation-only/ -verify
3-
// RUN: %target-swift-frontend -typecheck %s -primary-file %S/Inputs/inconsistent-implementation-only/2.swift %S/Inputs/inconsistent-implementation-only/3.swift -I %S/Inputs/inconsistent-implementation-only/ -verify
4-
// RUN: %target-swift-frontend -typecheck %s %S/Inputs/inconsistent-implementation-only/2.swift -primary-file %S/Inputs/inconsistent-implementation-only/3.swift -I %S/Inputs/inconsistent-implementation-only/ -verify
5-
// RUN: %target-swift-frontend -typecheck -primary-file %s -primary-file %S/Inputs/inconsistent-implementation-only/2.swift -primary-file %S/Inputs/inconsistent-implementation-only/3.swift -I %S/Inputs/inconsistent-implementation-only/ -verify
6-
// RUN: %target-swift-frontend -typecheck %s %S/Inputs/inconsistent-implementation-only/2.swift %S/Inputs/inconsistent-implementation-only/3.swift -I %S/Inputs/inconsistent-implementation-only/ -verify
5+
// RUN: %target-swift-frontend -typecheck -primary-file %t/1.swift %t/2.swift %t/3.swift -I %S/Inputs/inconsistent-implementation-only/ -verify
6+
// RUN: %target-swift-frontend -typecheck %t/1.swift -primary-file %t/2.swift %t/3.swift -I %S/Inputs/inconsistent-implementation-only/ -verify
7+
// RUN: %target-swift-frontend -typecheck %t/1.swift %t/2.swift -primary-file %t/3.swift -I %S/Inputs/inconsistent-implementation-only/ -verify
8+
// RUN: %target-swift-frontend -typecheck -primary-file %t/1.swift -primary-file %t/2.swift -primary-file %t/3.swift -I %S/Inputs/inconsistent-implementation-only/ -verify
9+
// RUN: %target-swift-frontend -typecheck %t/1.swift %t/2.swift %t/3.swift -I %S/Inputs/inconsistent-implementation-only/ -verify
10+
11+
//--- 1.swift
712

813
@_implementationOnly import NotSoSecret // expected-note {{imported as implementation-only here}}
914
import NotSoSecret2 // expected-warning {{'NotSoSecret2' inconsistently imported as implementation-only}} {{1-1=@_implementationOnly }}
@@ -13,3 +18,24 @@ import NotSoSecret3 // expected-warning {{'NotSoSecret3' inconsistently imported
1318
import ActuallyOkay // no-warning
1419

1520
@_exported import Contradictory // expected-warning {{'Contradictory' inconsistently imported as implementation-only}} {{none}}
21+
22+
//--- 2.swift
23+
24+
import NotSoSecret // expected-warning {{'NotSoSecret' inconsistently imported as implementation-only}}
25+
@_implementationOnly import NotSoSecret2 // expected-note 2 {{imported as implementation-only here}}
26+
import NotSoSecret3 // expected-warning {{'NotSoSecret3' inconsistently imported as implementation-only}}
27+
28+
@_implementationOnly import ActuallySecret // no-warning
29+
import ActuallyOkay // no-warning
30+
31+
@_implementationOnly import Contradictory // expected-note {{imported as implementation-only here}}
32+
33+
//--- 3.swift
34+
35+
@_implementationOnly import NotSoSecret
36+
import NotSoSecret2 // expected-warning {{'NotSoSecret2' inconsistently imported as implementation-only}}
37+
@_implementationOnly import NotSoSecret3 // expected-note 2 {{imported as implementation-only here}}
38+
39+
@_implementationOnly import ActuallySecret // no-warning
40+
import ActuallyOkay // no-warning
41+

0 commit comments

Comments
 (0)