mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.
19 lines
468 B
Swift
19 lines
468 B
Swift
func returnFifteen() -> Int {
|
|
var y = 10
|
|
func add() {
|
|
y += 5
|
|
if y > 50 {
|
|
print("bigger than 50")
|
|
} else {
|
|
print("less")
|
|
}
|
|
}
|
|
add()
|
|
return y
|
|
}
|
|
|
|
// RUN: %empty-directory(%t.result)
|
|
// RUN: %refactor -extract-function -source-filename %s -pos=5:1 -end-pos=9:6 >> %t.result/AvoidFilePrivate.swift
|
|
// RUN: diff -u %S/Outputs/extract_local/AvoidFilePrivate.swift.expected %t.result/AvoidFilePrivate.swift
|
|
// REQUIRES: swift_swift_parser
|