Files
swift-mirror/test/refactoring/ExtractFunction/throw_errors2.swift
Saleem Abdulrasool b67d5f0cf7 test: convert rm -rf && mkdir -p into %empty-directory
This converts the instances of the pattern for which we have a proper
substitution in lit.  This will make it easier to replace it
appropriately with Windows equivalents.
2018-03-06 14:30:54 -08:00

18 lines
411 B
Swift

enum MyError : Error {
case customError
}
struct RefactorExtractProblem {
func testExtract() {
do {
throw MyError.customError
} catch {
print(error)
}
}
}
// RUN: %empty-directory(%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