Files
swift-mirror/test/SourceKit/Refactoring/semantic-refactoring/extract-func-with-args.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

13 lines
457 B
Swift

func foo() -> Int {
var a = 3
a = a + 1
return 1
}
// RUN: rm -rf %t.result && mkdir -p %t.result
// RUN: %sourcekitd-test -req=extract-func -pos=3:1 -end-pos 3:12 -name new_name %s -- %s > %t.result/extract-func-with-args.swift.expected
// RUN: diff -u %S/extract-func-with-args.swift.expected %t.result/extract-func-with-args.swift.expected
// FIXME: Fails on linux with assertion: "!GlibcModuleMapPath.empty()"" failed
// REQUIRES-ANY: OS=macosx