Skip to content

Commit 6db68cb

Browse files
committed
[SourceKit] Adjust test case since we now consider argument labels in comments
Companion of swiftlang/swift-syntax#2401
1 parent bf102d2 commit 6db68cb

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

test/refactoring/SyntacticRename/Outputs/textual/foo.swift.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
/*foo:unknown*/<base>foo</base>() is not /*foo:unknown*/<base>foo</base>(first:)
2+
/*foo:unknown*/<base>foo</base>() is not /*foo:unknown*/foo(first:)
33
*/
44
/// This describes /*foo:unknown*/<base>foo</base> and /*foo:unknown*/<base>foo</base>
55
func /*foo:def*/<base>foo</base>() {
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// REQUIRES: swift_swift_parser
2+
// RUN: %empty-directory(%t)
3+
// RUN: split-file %s %t
4+
// RUN: %refactor -find-rename-ranges -source-filename %t/input.swift -pos="foo" -is-function-like -old-name "foo(baz:)" > %t/actual-output.swift
5+
// RUN: diff -u %t/expected-output.swift %t/actual-output.swift
6+
7+
//--- input.swift
8+
9+
/// `/*foo:unknown*/foo(baz:)` does very importants stuff
10+
func /*foo:def*/foo(baz: Int) {}
11+
12+
//--- expected-output.swift
13+
14+
/// `/*foo:unknown*/<base>foo</base>(<sel index=0>baz</sel>:)` does very importants stuff
15+
func /*foo:def*/<base>foo</base>(<arglabel index=0>baz</arglabel><param index=0></param>: Int) {}
16+

0 commit comments

Comments
 (0)