@@ -17,30 +17,31 @@ class SemanticdbSymbolsTest {
1717 " Basic two methods" ,
1818 SourceFile .testKt(
1919 """
20- class Test {
21- fun sample() {}
22- fun sample(x: Int) {}
23- }
24- """ ),
20+ | class Test {
21+ | fun sample() {}
22+ | fun sample(x: Int) {}
23+ | }
24+ | """ .trimMargin() ),
2525 symbolsCacheData =
2626 SymbolCacheData (
2727 listOf (" Test#sample()." .symbol(), " Test#sample(+1)." .symbol()),
2828 )),
2929 ExpectedSymbols (
3030 " Inline class constructor" ,
31- SourceFile .testKt("""
32- class Test(val x: Int)
33- """ ),
31+ SourceFile .testKt(
32+ """
33+ |class Test(val x: Int)
34+ |""" .trimMargin()),
3435 symbolsCacheData = SymbolCacheData (listOf (" Test#`<init>`().(x)" .symbol()))),
3536 ExpectedSymbols (
3637 " Inline + secondary class constructors" ,
3738 SourceFile .testKt(
3839 """
39- class Test(val x: Int) {
40- constructor(y: Long): this(y.toInt())
41- constructor(z: String): this(z.toInt())
42- }
43- """ ),
40+ | class Test(val x: Int) {
41+ | constructor(y: Long): this(y.toInt())
42+ | constructor(z: String): this(z.toInt())
43+ | }
44+ | """ .trimMargin() ),
4445 symbolsCacheData =
4546 SymbolCacheData (
4647 listOf (
@@ -51,38 +52,38 @@ class SemanticdbSymbolsTest {
5152 " Disambiguator number is not affected by different named methods" ,
5253 SourceFile .testKt(
5354 """
54- class Test {
55- fun sample() {}
56- fun test() {}
57- fun test(x: Int) {}
58- }
59- """ ),
55+ | class Test {
56+ | fun sample() {}
57+ | fun test() {}
58+ | fun test(x: Int) {}
59+ | }
60+ | """ .trimMargin() ),
6061 symbolsCacheData =
6162 SymbolCacheData (
6263 listOf (" Test#test()." .symbol(), " Test#test(+1)." .symbol()))),
6364 ExpectedSymbols (
6465 " Top level overloaded functions" ,
6566 SourceFile .testKt(
6667 """
67- fun test() {}
68- fun test(x: Int) {}
69- """ ),
68+ | fun test() {}
69+ | fun test(x: Int) {}
70+ | """ .trimMargin() ),
7071 symbolsCacheData =
7172 SymbolCacheData (
7273 listOf (" TestKt#test()." .symbol(), " TestKt#test(+1).(x)" .symbol()))),
7374 ExpectedSymbols (
7475 " Annotations incl annotation type alias" ,
7576 SourceFile .testKt(
7677 """
77- import kotlin.contracts.ExperimentalContracts
78- import kotlin.test.Test
79-
80- @ExperimentalContracts
81- class Banaan {
82- @Test
83- fun test() {}
84- }
85- """ ),
78+ | import kotlin.contracts.ExperimentalContracts
79+ | import kotlin.test.Test
80+ |
81+ | @ExperimentalContracts
82+ | class Banaan {
83+ | @Test
84+ | fun test() {}
85+ | }
86+ | """ .trimMargin() ),
8687 symbolsCacheData =
8788 SymbolCacheData (
8889 listOf (
@@ -109,26 +110,27 @@ class SemanticdbSymbolsTest {
109110 " single component package name" ,
110111 SourceFile .testKt(
111112 """
112- package main
113-
114- class Test
115- """ ),
113+ | package main
114+ |
115+ | class Test
116+ | """ .trimMargin() ),
116117 symbolsCacheData = SymbolCacheData (listOf (" main/Test#" .symbol()), 0 )),
117118 ExpectedSymbols (
118119 " multi component package name" ,
119120 SourceFile .testKt(
120121 """
121- package test.sample.main
122-
123- class Test
124- """ ),
122+ | package test.sample.main
123+ |
124+ | class Test
125+ | """ .trimMargin() ),
125126 symbolsCacheData =
126127 SymbolCacheData (listOf (" test/sample/main/Test#" .symbol()), 0 )),
127128 ExpectedSymbols (
128129 " no package name" ,
129- SourceFile .testKt("""
130- class Test
131- """ ),
130+ SourceFile .testKt(
131+ """
132+ |class Test
133+ |""" .trimMargin()),
132134 symbolsCacheData = SymbolCacheData (listOf (" Test#" .symbol()), 0 )))
133135 .mapCheckExpectedSymbols()
134136
@@ -139,11 +141,11 @@ class SemanticdbSymbolsTest {
139141 " simple variables" ,
140142 SourceFile .testKt(
141143 """
142- fun test() {
143- val x = "hello"
144- println(x)
145- }
146- """ ),
144+ | fun test() {
145+ | val x = "hello"
146+ | println(x)
147+ | }
148+ | """ .trimMargin() ),
147149 symbolsCacheData = SymbolCacheData (localsCount = 1 )))
148150 .mapCheckExpectedSymbols()
149151
@@ -154,11 +156,11 @@ class SemanticdbSymbolsTest {
154156 " types" ,
155157 SourceFile .testKt(
156158 """
157- var x: Int = 1
158- lateinit var y: Unit
159- lateinit var z: Any
160- lateinit var w: Nothing
161- """ ),
159+ | var x: Int = 1
160+ | lateinit var y: Unit
161+ | lateinit var z: Any
162+ | lateinit var w: Nothing
163+ | """ .trimMargin() ),
162164 symbolsCacheData =
163165 SymbolCacheData (
164166 listOf (
@@ -170,11 +172,11 @@ class SemanticdbSymbolsTest {
170172 " functions" ,
171173 SourceFile .testKt(
172174 """
173- val x = mapOf<Void, Void>()
174- fun main() {
175- println()
176- }
177- """ ),
175+ | val x = mapOf<Void, Void>()
176+ | fun main() {
177+ | println()
178+ | }
179+ | """ .trimMargin() ),
178180 symbolsCacheData =
179181 SymbolCacheData (
180182 listOf (
@@ -189,12 +191,12 @@ class SemanticdbSymbolsTest {
189191 " dot qualified expression" ,
190192 SourceFile .testKt(
191193 """
192- import java.lang.System
193-
194- fun main() {
195- System.err
196- }
197- """ ),
194+ | import java.lang.System
195+ |
196+ | fun main() {
197+ | System.err
198+ | }
199+ | """ .trimMargin() ),
198200 symbolsCacheData = SymbolCacheData (listOf (" java/lang/System#err." .symbol()))))
199201 .mapCheckExpectedSymbols()
200202
@@ -203,9 +205,10 @@ class SemanticdbSymbolsTest {
203205 listOf (
204206 ExpectedSymbols (
205207 " top level properties - implicit" ,
206- SourceFile .testKt("""
207- var x: Int = 5
208- """ ),
208+ SourceFile .testKt(
209+ """
210+ |var x: Int = 5
211+ |""" .trimMargin()),
209212 semanticdb =
210213 SemanticdbData (
211214 expectedOccurrences =
@@ -245,9 +248,9 @@ class SemanticdbSymbolsTest {
245248 " top level properties - explicit getter" ,
246249 SourceFile .testKt(
247250 """
248- var x: Int = 5
249- get() = field + 10
250- """ ),
251+ | var x: Int = 5
252+ | get() = field + 10
253+ | """ .trimMargin() ),
251254 semanticdb =
252255 SemanticdbData (
253256 expectedOccurrences =
@@ -287,9 +290,9 @@ class SemanticdbSymbolsTest {
287290 " top level properties - explicit setter" ,
288291 SourceFile .testKt(
289292 """
290- var x: Int = 5
291- set(value) { field = value + 5 }
292- """ ),
293+ | var x: Int = 5
294+ | set(value) { field = value + 5 }
295+ | """ .trimMargin() ),
293296 semanticdb =
294297 SemanticdbData (
295298 expectedOccurrences =
@@ -329,10 +332,10 @@ class SemanticdbSymbolsTest {
329332 " top level properties - explicit getter & setter" ,
330333 SourceFile .testKt(
331334 """
332- var x: Int = 5
333- get() = field + 10
334- set(value) { field = value + 10 }
335- """ ),
335+ | var x: Int = 5
336+ | get() = field + 10
337+ | set(value) { field = value + 10 }
338+ | """ .trimMargin() ),
336339 semanticdb =
337340 SemanticdbData (
338341 expectedOccurrences =
@@ -372,12 +375,12 @@ class SemanticdbSymbolsTest {
372375 " class constructor properties" ,
373376 SourceFile .testKt(
374377 """
375- class Test(var sample: Int, text: String): Throwable(sample.toString()) {
376- fun test() {
377- println(sample)
378- }
379- }
380- """ ),
378+ | class Test(var sample: Int, text: String): Throwable(sample.toString()) {
379+ | fun test() {
380+ | println(sample)
381+ | }
382+ | }
383+ | """ .trimMargin() ),
381384 semanticdb =
382385 SemanticdbData (
383386 expectedOccurrences =
@@ -460,9 +463,10 @@ class SemanticdbSymbolsTest {
460463 listOf (
461464 ExpectedSymbols (
462465 " implicit primary constructor" ,
463- SourceFile .testKt("""
464- class Banana
465- """ ),
466+ SourceFile .testKt(
467+ """
468+ |class Banana
469+ |""" .trimMargin()),
466470 semanticdb =
467471 SemanticdbData (
468472 expectedOccurrences =
@@ -490,9 +494,10 @@ class SemanticdbSymbolsTest {
490494 ))),
491495 ExpectedSymbols (
492496 " explicit primary constructor without keyword" ,
493- SourceFile .testKt("""
494- class Banana(size: Int)
495- """ ),
497+ SourceFile .testKt(
498+ """
499+ |class Banana(size: Int)
500+ |""" .trimMargin()),
496501 semanticdb =
497502 SemanticdbData (
498503 expectedOccurrences =
@@ -522,8 +527,8 @@ class SemanticdbSymbolsTest {
522527 " explicit primary constructor with keyword" ,
523528 SourceFile .testKt(
524529 """
525- class Banana constructor(size: Int)
526- """ ),
530+ | class Banana constructor(size: Int)
531+ | """ .trimMargin() ),
527532 semanticdb =
528533 SemanticdbData (
529534 expectedOccurrences =
@@ -558,8 +563,8 @@ class SemanticdbSymbolsTest {
558563 " basic java.lang.Runnable" ,
559564 SourceFile .testKt(
560565 """
561- val x = Runnable { }.run()
562- """ ),
566+ | val x = Runnable { }.run()
567+ | """ .trimMargin() ),
563568 semanticdb =
564569 SemanticdbData (
565570 expectedOccurrences =
0 commit comments