Skip to content

Commit e27f9dd

Browse files
authored
Merge pull request #83413 from tshortli/symbol-graph-extract-infer-target-test
swift-symbolgraph-extract: Fix `-target` inference test
2 parents 682b38d + f5b67e2 commit e27f9dd

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

test/SymbolGraph/Relationships/MemberOf/Basic.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44
// RUN: %target-swift-symbolgraph-extract -module-name Basic -I %t -pretty-print -output-dir %t/Output
55
// RUN: %FileCheck %s --input-file %t/Output/Basic.symbols.json
66

7-
// Verify that -target can be inferred
8-
// RUN: %empty-directory(%t/Output)
9-
// RUN: %swift-symbolgraph-extract -module-name Basic -I %t -pretty-print -output-dir %t/Output
10-
// RUN: %FileCheck %s --input-file %t/Output/Basic.symbols.json
11-
127
public struct S {
138
public var x: Int
149
}

test/SymbolGraph/infer-target.swift

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %empty-directory(%t/Output)
3+
// RUN: %target-build-swift %s -module-name Basic -emit-module -emit-module-path %t/
4+
5+
// Verify that -target can be inferred
6+
// RUN: %empty-directory(%t/Output)
7+
// RUN: %swift-symbolgraph-extract -module-name Basic -I %t -pretty-print -output-dir %t/Output
8+
// RUN: %FileCheck %s --input-file %t/Output/Basic.symbols.json
9+
10+
// This test can only work for test configurations that aren't cross-compiling.
11+
// REQUIRES: OS=macosx || OS=linux-gnu || OS=windows-msvc
12+
13+
public struct S {
14+
public var x: Int
15+
}
16+
17+
// CHECK: "kind": "memberOf"
18+
// CHECK-NEXT: "source": "s:5Basic1SV1xSivp"
19+
// CHECK-NEXT: "target": "s:5Basic1SV"

0 commit comments

Comments
 (0)