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.
33 lines
759 B
Swift
33 lines
759 B
Swift
enum MyEnum {
|
|
case Case1
|
|
case Case2
|
|
case Case3
|
|
}
|
|
|
|
func foo2(_ e : MyEnum) -> Int {
|
|
switch e {
|
|
case .Case1:
|
|
break
|
|
case .Case2:
|
|
break
|
|
case .Case3:
|
|
break
|
|
}
|
|
switch e {
|
|
case .Case1:
|
|
return 1
|
|
case .Case2:
|
|
return 2
|
|
case .Case3:
|
|
return 3
|
|
}
|
|
}
|
|
|
|
// RUN: %empty-directory(%t.result)
|
|
// RUN: %refactor -extract-function -source-filename %s -pos=8:1 -end-pos=15:4 >> %t.result/Void.swift
|
|
// RUN: diff -u %S/Outputs/extract_switch/Void.swift.expected %t.result/Void.swift
|
|
// RUN: %empty-directory(%t.result)
|
|
// RUN: %refactor -extract-function -source-filename %s -pos=16:1 -end-pos=23:4 >> %t.result/Int.swift
|
|
// RUN: diff -u %S/Outputs/extract_switch/Int.swift.expected %t.result/Int.swift
|
|
// REQUIRES: swift_swift_parser
|