Skip to content
Permalink
Browse files

[test] Add a test for indenting class var.

  • Loading branch information...
nkcsgexi committed Feb 10, 2016
1 parent 9eeeb4d commit ad33048af9003b117dfb7b6542d779c136b0b859
Showing with 12 additions and 1 deletion.
  1. +12 −1 test/SourceKit/CodeFormat/indent-implicit-getter.swift
@@ -16,7 +16,14 @@ class Foo {
}
}


class Foo1 {
var foo: Int {
return 1
}
class var foo: Int {
return 1
}
}
// RUN: %sourcekitd-test -req=format -line=1 -length=1 %s >%t.response
// RUN: %sourcekitd-test -req=format -line=2 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=3 -length=1 %s >>%t.response
@@ -34,6 +41,8 @@ class Foo {
// RUN: %sourcekitd-test -req=format -line=15 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=16 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=17 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=20 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=23 -length=1 %s >>%t.response
// RUN: FileCheck --strict-whitespace %s <%t.response
@@ -54,3 +63,5 @@ class Foo {
// CHECK: key.sourcetext: " return x"
// CHECK: key.sourcetext: " }"
// CHECK: key.sourcetext: "}"
// CHECK: key.sourcetext: " var foo: Int {"
// CHECK: key.sourcetext: " class var foo: Int {"

0 comments on commit ad33048

Please sign in to comment.
You can’t perform that action at this time.