Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions test/SymbolGraph/infer-target.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// RUN: %empty-directory(%t)
// RUN: %empty-directory(%t/Output)
// RUN: %target-build-swift %s -module-name Basic -emit-module -emit-module-path %t/

// Verify that -target can be inferred
// RUN: %empty-directory(%t/Output)
// RUN: %swift-symbolgraph-extract -module-name Basic -I %t -pretty-print -output-dir %t/Output
// RUN: %FileCheck %s --input-file %t/Output/Basic.symbols.json

// This test can only work for test configurations that aren't cross-compiling.
// REQUIRES: target-same-as-host

public struct S {
public var x: Int
}

// CHECK: "kind": "memberOf"
// CHECK-NEXT: "source": "s:5Basic1SV1xSivp"
// CHECK-NEXT: "target": "s:5Basic1SV"