Files
swift-mirror/test/refactoring/rename/prefix_operator.swift
Alex Hoppen a710111001 [SourceKit] Support building sourcekitd without building swift-syntax
This allows building sourcekitd and swift-refactor with `SWIFT_BUILD_SWIFT_SYNTAX=NO`. In these builds, the `relatedidents` and `find-syntactic-rename-ranges` requests will always return an error.
2023-12-04 19:14:01 -08:00

13 lines
561 B
Swift

let foo: Int = 12
let negfoo = -foo
print("opposite of \(foo) is \(negfoo)")
// REQUIRES: swift_swift_parser
// RUN: %empty-directory(%t.result)
// RUN: %refactor -find-local-rename-ranges -source-filename %s -pos=1:5 -new-name bar >> %t.result/def.swift
// RUN: diff -u %S/Outputs/prefix_operator/refactor.swift.expected %t.result/def.swift
// RUN: %refactor -find-local-rename-ranges -source-filename %s -pos=2:15 -new-name bar >> %t.result/operator_ref.swift
// RUN: diff -u %S/Outputs/prefix_operator/refactor.swift.expected %t.result/operator_ref.swift