Files
swift-mirror/test/refactoring/ExtractFunction/static.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

20 lines
553 B
Swift

class C {
func foo1() -> Int {
var a = 3 + 1
a = 3
return a
}
static func foo2() -> Int {
var a = 3 + 1
a = 3
return a
}
}
// RUN: %empty-directory(%t.result)
// RUN: %refactor -extract-function -source-filename %s -pos=3:1 -end-pos=5:13 >> %t.result/L3-5.swift
// RUN: diff -u %S/Outputs/static/L3-5.swift.expected %t.result/L3-5.swift
// RUN: %refactor -extract-function -source-filename %s -pos=9:1 -end-pos=11:13 >> %t.result/L9-11.swift
// RUN: diff -u %S/Outputs/static/L9-11.swift.expected %t.result/L9-11.swift