formatter fix on properties
This commit is contained in:
1 parent
555c9b94de
commit
72bb6ae67b
2 files changed
+59
-4
No files matched your search
@@ -859,4 +859,31 @@ class LyngFormatterTest {
|
||||
""".trimIndent()
|
||||
assertEquals(expected2, LyngFormatter.reindent(src2, LyngFormatConfig(indentSize = 4)))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun mixedPropertyAccessors() {
|
||||
val src = """
|
||||
class X {
|
||||
var x get() {
|
||||
11
|
||||
}
|
||||
set(value) {
|
||||
}
|
||||
}
|
||||
""".trimIndent()
|
||||
|
||||
val expected = """
|
||||
class X {
|
||||
var x get() {
|
||||
11
|
||||
}
|
||||
set(value) {
|
||||
}
|
||||
}
|
||||
""".trimIndent()
|
||||
|
||||
val cfg = LyngFormatConfig(indentSize = 4, continuationIndentSize = 4)
|
||||
val out = LyngFormatter.reindent(src, cfg)
|
||||
assertEquals(expected, out)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user