File tree 1 file changed +11
-0
lines changed
test/SourceKit/CodeFormat
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,13 @@ public func someTestFunc(withArgumentLabel label: String,
42
42
andAnotherArgumentLabel label3: String ) {
43
43
}
44
44
45
+ func foo( x: Int , y: Int , z: Int ) { }
46
+ func testFoo( ) {
47
+ foo ( x: 1 , // comment
48
+ y: 2 ,
49
+ z: 3 )
50
+ }
51
+
45
52
// RUN: %sourcekitd-test -req=format -line=6 -length=1 %s >%t.response
46
53
// RUN: %sourcekitd-test -req=format -line=7 -length=1 %s >>%t.response
47
54
// RUN: %sourcekitd-test -req=format -line=8 -length=1 %s >>%t.response
@@ -56,6 +63,7 @@ public func someTestFunc(withArgumentLabel label: String,
56
63
// RUN: %sourcekitd-test -req=format -line=37 -length=1 %s >>%t.response
57
64
// RUN: %sourcekitd-test -req=format -line=41 -length=1 %s >>%t.response
58
65
// RUN: %sourcekitd-test -req=format -line=42 -length=1 %s >>%t.response
66
+ // RUN: %sourcekitd-test -req=format -line=48 -length=1 %s >>%t.response
59
67
60
68
// RUN: %FileCheck --strict-whitespace %s <%t.response
61
69
@@ -93,3 +101,6 @@ public func someTestFunc(withArgumentLabel label: String,
93
101
94
102
// " someOtherArgumentLabel label2: String,"
95
103
// CHECK: key.sourcetext: " andAnotherArgumentLabel label3: String) {"
104
+
105
+ // " foo(x: 1, // comment"
106
+ // CHECK: key.sourcetext: " y: 2,"
You can’t perform that action at this time.
0 commit comments