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

17 lines
405 B
Swift

public class C {
public func foo() -> Int{
var aaa = 1 + 2
// this is comments
aaa = aaa + 3
if aaa == 3 { aaa = 4 }
// we have comments here too
return aaa
}
}
// RUN: %empty-directory(%t.result)
// RUN: %refactor -extract-function -source-filename %s -pos=6:1 -end-pos=7:26 >> %t.result/L6-7.swift
// RUN: diff -u %S/Outputs/extract_with_comments/L6-7.swift.expected %t.result/L6-7.swift