Files
swift-mirror/test/refactoring/rename/localEnum.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

16 lines
566 B
Swift

func boop() {
enum LocalEnum {
case north
case south
}
print(LocalEnum.north)
}
// REQUIRES: swift_swift_parser
// RUN: %empty-directory(%t.result)
// RUN: %refactor -find-local-rename-ranges -source-filename %s -pos=3:10 -new-name east > %t.result/north_def.swift
// RUN: diff -u %S/Outputs/localEnum/north.swift.expected %t.result/north_def.swift
// RUN: %refactor -find-local-rename-ranges -source-filename %s -pos=7:19 -new-name east > %t.result/north_ref.swift
// RUN: diff -u %S/Outputs/localEnum/north.swift.expected %t.result/north_ref.swift