diff --git a/idea/tests/org/jetbrains/kotlin/idea/parameterInfo/LambdaReturnValueHintsTest.kt b/idea/tests/org/jetbrains/kotlin/idea/parameterInfo/LambdaReturnValueHintsTest.kt
index fec7a28c8e9..35fa4e7484f 100644
--- a/idea/tests/org/jetbrains/kotlin/idea/parameterInfo/LambdaReturnValueHintsTest.kt
+++ b/idea/tests/org/jetbrains/kotlin/idea/parameterInfo/LambdaReturnValueHintsTest.kt
@@ -13,77 +13,84 @@ class LambdaReturnValueHintsTest : KotlinLightCodeInsightFixtureTestCase() {
override fun getProjectDescriptor(): KotlinLightProjectDescriptor = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE
fun check(text: String) {
- myFixture.configureByText("A.kt", text)
+ myFixture.configureByText("A.kt", text.trimIndent())
myFixture.testInlays()
}
fun testSimple() {
check(
- """val x = run {
+ """
+ val x = run {
println("foo")
1
- }
- """
+ }
+ """
)
}
fun testQualified() {
check(
- """val x = run {
+ """
+ val x = run {
var s = "abc"
s.length
- }
- """
+ }
+ """
)
}
fun testIf() {
check(
- """val x = run {
+ """
+ val x = run {
if (true) {
1
} else {
0
}
- }
- """
+ }
+ """
)
}
fun testWhen() {
check(
- """val x = run {
+ """
+ val x = run {
when (true) {
- true -> 1
- false ->0
+ true -> 1
+ false ->0
}
- }
- """
+ }
+ """
)
}
fun testNoHintForSingleExpression() {
check(
- """val x = run {
+ """
+ val x = run {
1
- }
- """
+ }
+ """
)
}
fun testLabel() {
check(
- """val x = run foo@{
+ """
+ val x = run foo@{
println("foo")
1
- }
- """
+ }
+ """
)
}
fun testNested() {
check(
- """val x = run hello@{
+ """
+ val x = run hello@{
if (true) {
}
@@ -93,39 +100,40 @@ class LambdaReturnValueHintsTest : KotlinLightCodeInsightFixtureTestCase() {
false -> 0
}
}
- }"""
+ }
+ """
)
}
fun testElvisOperator() {
check(
"""
- fun foo() {
- run {
- val length: Int? = null
- length ?: 0
- }
+ fun foo() {
+ run {
+ val length: Int? = null
+ length ?: 0
}
- """.trimIndent()
+ }
+ """
)
}
fun testPostfixPrefixExpressions() {
check(
"""
- fun bar() {
- var test = 0
- run {
- test
- test++
- }
-
- run {
- test
- ++test
- }
+ fun bar() {
+ var test = 0
+ run {
+ test
+ test++
}
- """.trimIndent()
+
+ run {
+ test
+ ++test
+ }
+ }
+ """
)
}
}