mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[sourcekitd-test] Support refactoring based on a byte offset location
If an offset position but no line/column combination is given to `sourcekitd-test` when requesting a refactoring action, compute the line/column from the offset.
This commit is contained in:
@@ -129,6 +129,7 @@ func hasCallToAsyncAlternative() {
|
||||
// CHECK1-NEXT: ACTIONS END
|
||||
|
||||
// RUN: %sourcekitd-test -req=cursor -pos=1:16 -cursor-action %s -- %s | %FileCheck %s -check-prefix=CHECK2
|
||||
// RUN: %sourcekitd-test -req=cursor -offset=16 -cursor-action %s -- %s | %FileCheck %s -check-prefix=CHECK2
|
||||
|
||||
// RUN: %sourcekitd-test -req=cursor -pos=12:8 -cursor-action %s -- %s | %FileCheck %s -check-prefix=CHECK3
|
||||
// RUN: %sourcekitd-test -req=cursor -pos=21:5 -cursor-action %s -- %s | %FileCheck %s -check-prefix=CHECK4
|
||||
|
||||
Reference in New Issue
Block a user