Files
swift-mirror/test/refactoring/SyntacticRename/operator.swift
Daniel Rodríguez Troitiño e60785e1ef [test] Mark some tests as requiring Swift Syntax (#70493)
Some of the tests now depend on features provided by Swift Syntax, and
will fail to pass if building without Swift Syntax support.

This commits marks all the tests I know fail to pass when Swift Syntax
is disabled.

- #70281 modified `ASTGen/verify-parse.swift`
- #70287 created `refactoring/SyntacticRename/operator.swift` and `SourceKit/RelatedIdents/operator.swift`
- #70389 modified `SourceKit/Refactoring/basic.swift` and indirectly
  modified all `refactoring/ExtractFunction/*` tests.
2023-12-15 13:33:14 -08:00

20 lines
499 B
Swift

// RUN: %empty-directory(%t)
// RUN: split-file %s %t
// RUN: %refactor -find-rename-ranges -source-filename %t/input.swift -pos="test" -old-name "+(x:y:)" -new-name "-(x:y:)" > %t/output.txt
// RUN: diff -u %t/expected.swift %t/output.txt
// REQUIRES: swift_swift_parser
//--- input.swift
struct Foo {}
func /*test:def*/+(x: Foo, y: Foo) {}
Foo() /*test:ref*/+ Foo()
//--- expected.swift
struct Foo {}
func /*test:def*/<base>+</base>(x: Foo, y: Foo) {}
Foo() /*test:ref*/<base>+</base> Foo()