Files
swift-mirror/test/refactoring/ExtractFunction/throw_errors2.swift
Argyrios Kyrtzidis 60a91bb736 [refactoring] Upstreaming the implementation for Swift local refactoring (#11568)
[refactoring] Upstreaming the implementation for Swift local refactoring
2017-08-22 16:50:16 -07:00

18 lines
422 B
Swift

enum MyError : Error {
case customError
}
struct RefactorExtractProblem {
func testExtract() {
do {
throw MyError.customError
} catch {
print(error)
}
}
}
// RUN: rm -rf %t.result && mkdir -p %t.result
// RUN: %refactor -extract-function -source-filename %s -pos=7:1 -end-pos=11:6 >> %t.result/L7-11.swift
// RUN: diff -u %S/Outputs/throw_errors2/L7-11.swift.expected %t.result/L7-11.swift