Skip to content

Commit

Permalink
count sourceOrigin outside the linear check to make it consistent
Browse files Browse the repository at this point in the history
rdar://106084537
  • Loading branch information
QuietMisdreavus committed Mar 2, 2023
1 parent 54b35e8 commit 0ab9348
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/SymbolGraph/Symbols/SkipProtocolImplementations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
// RUN: %target-swift-frontend %s -module-name SkipProtocolImplementations -emit-module -emit-module-path %t/SkipProtocolImplementations.swiftmodule -emit-symbol-graph -emit-symbol-graph-dir %t/ -skip-protocol-implementations
// RUN: %{python} -m json.tool %t/SkipProtocolImplementations.symbols.json %t/SkipProtocolImplementations.formatted.symbols.json
// RUN: %FileCheck %s --input-file %t/SkipProtocolImplementations.formatted.symbols.json
// RUN: %FileCheck %s --input-file %t/SkipProtocolImplementations.formatted.symbols.json --check-prefix COUNT

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend %s -module-name SkipProtocolImplementations -emit-module -emit-module-path %t/SkipProtocolImplementations.swiftmodule -emit-module-doc-path %t/SkipProtocolImplementations.swiftdoc
// RUN: %target-swift-symbolgraph-extract -module-name SkipProtocolImplementations -I %t -skip-protocol-implementations -pretty-print -output-dir %t
// RUN: %FileCheck %s --input-file %t/SkipProtocolImplementations.symbols.json
// RUN: %FileCheck %s --input-file %t/SkipProtocolImplementations.symbols.json --check-prefix COUNT

// make sure that using `-skip-protocol-implementations` removes the functions from `SomeProtocol` on `SomeStruct`
// CHECK-NOT: s:27SkipProtocolImplementations04SomeB0PAAE9bonusFuncyyF::SYNTHESIZED::s:27SkipProtocolImplementations10SomeStructV
Expand All @@ -23,7 +25,7 @@
// CHECK-DAG: conformsTo

// SomeStruct.otherFunc() should be the only one with sourceOrigin information
// CHECK-COUNT-1: sourceOrigin
// COUNT-COUNT-1: sourceOrigin

public protocol SomeProtocol {
/// Base docs
Expand Down

0 comments on commit 0ab9348

Please sign in to comment.