Skip to content

Commit 73baf7d

Browse files
committed
[test] Tweak a SymbolGraph test
Add `-wmo` to the invocation to ensure we don't end up doing merge-modules, which makes the test consistent across both the old and new driver.
1 parent bbb04aa commit 73baf7d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/SymbolGraph/Symbols/Mixins/DeclarationFragments/Full/SomeProtocol.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
// RUN: %FileCheck %s --input-file %t/SomeProtocol.symbols.json
55
// RUN: %FileCheck %s --input-file %t/SomeProtocol.symbols.json --check-prefix MULTI
66

7+
// Note we use '-wmo' here to make sure the driver doesn't do merge-modules,
8+
// which would result in printing the Type instead of TypeRepr, leading to
9+
// inconsistency with the new driver. Once we switch to always using the new
10+
// driver, we can remove it.
711
// RUN: %empty-directory(%t)
8-
// RUN: %target-build-swift %s -module-name SomeProtocol -emit-module -emit-module-path %t/SomeProtocol.swiftmodule -emit-symbol-graph -emit-symbol-graph-dir %t/
12+
// RUN: %target-build-swift %s -module-name SomeProtocol -emit-module -wmo -emit-module-path %t/SomeProtocol.swiftmodule -emit-symbol-graph -emit-symbol-graph-dir %t/
913
// RUN: %validate-json %t/SomeProtocol.symbols.json %t/SomeProtocol.formatted.symbols.json
1014
// RUN: %FileCheck %s --input-file %t/SomeProtocol.formatted.symbols.json
1115
// RUN: %FileCheck %s --input-file %t/SomeProtocol.formatted.symbols.json --check-prefix MULTI
@@ -19,7 +23,7 @@ public func doSomething(with param: some SomeProtocol) {}
1923

2024
public protocol OtherProtocol {}
2125

22-
public func doSomethingElse(with param: some SomeProtocol & OtherProtocol) {}
26+
public func doSomethingElse(with param: some OtherProtocol & SomeProtocol) {}
2327

2428
// CHECK-LABEL: "precise": "s:12SomeProtocol11doSomething4withyx_tA2ARzlF",
2529

0 commit comments

Comments
 (0)