Minor: reformat LambdaReturnValueHints.kt
This commit is contained in:
@@ -13,13 +13,14 @@ class LambdaReturnValueHintsTest : KotlinLightCodeInsightFixtureTestCase() {
|
|||||||
override fun getProjectDescriptor(): KotlinLightProjectDescriptor = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE
|
override fun getProjectDescriptor(): KotlinLightProjectDescriptor = KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE
|
||||||
|
|
||||||
fun check(text: String) {
|
fun check(text: String) {
|
||||||
myFixture.configureByText("A.kt", text)
|
myFixture.configureByText("A.kt", text.trimIndent())
|
||||||
myFixture.testInlays()
|
myFixture.testInlays()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun testSimple() {
|
fun testSimple() {
|
||||||
check(
|
check(
|
||||||
"""val x = run {
|
"""
|
||||||
|
val x = run {
|
||||||
println("foo")
|
println("foo")
|
||||||
<hint text="^run" />1
|
<hint text="^run" />1
|
||||||
}
|
}
|
||||||
@@ -29,7 +30,8 @@ class LambdaReturnValueHintsTest : KotlinLightCodeInsightFixtureTestCase() {
|
|||||||
|
|
||||||
fun testQualified() {
|
fun testQualified() {
|
||||||
check(
|
check(
|
||||||
"""val x = run {
|
"""
|
||||||
|
val x = run {
|
||||||
var s = "abc"
|
var s = "abc"
|
||||||
<hint text="^run" />s.length
|
<hint text="^run" />s.length
|
||||||
}
|
}
|
||||||
@@ -39,7 +41,8 @@ class LambdaReturnValueHintsTest : KotlinLightCodeInsightFixtureTestCase() {
|
|||||||
|
|
||||||
fun testIf() {
|
fun testIf() {
|
||||||
check(
|
check(
|
||||||
"""val x = run {
|
"""
|
||||||
|
val x = run {
|
||||||
if (true) {
|
if (true) {
|
||||||
<hint text="^run" />1
|
<hint text="^run" />1
|
||||||
} else {
|
} else {
|
||||||
@@ -52,7 +55,8 @@ class LambdaReturnValueHintsTest : KotlinLightCodeInsightFixtureTestCase() {
|
|||||||
|
|
||||||
fun testWhen() {
|
fun testWhen() {
|
||||||
check(
|
check(
|
||||||
"""val x = run {
|
"""
|
||||||
|
val x = run {
|
||||||
when (true) {
|
when (true) {
|
||||||
true -> <hint text="^run" />1
|
true -> <hint text="^run" />1
|
||||||
false -><hint text="^run" />0
|
false -><hint text="^run" />0
|
||||||
@@ -64,7 +68,8 @@ class LambdaReturnValueHintsTest : KotlinLightCodeInsightFixtureTestCase() {
|
|||||||
|
|
||||||
fun testNoHintForSingleExpression() {
|
fun testNoHintForSingleExpression() {
|
||||||
check(
|
check(
|
||||||
"""val x = run {
|
"""
|
||||||
|
val x = run {
|
||||||
1
|
1
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
@@ -73,7 +78,8 @@ class LambdaReturnValueHintsTest : KotlinLightCodeInsightFixtureTestCase() {
|
|||||||
|
|
||||||
fun testLabel() {
|
fun testLabel() {
|
||||||
check(
|
check(
|
||||||
"""val x = run foo@{
|
"""
|
||||||
|
val x = run foo@{
|
||||||
println("foo")
|
println("foo")
|
||||||
<hint text="^foo" />1
|
<hint text="^foo" />1
|
||||||
}
|
}
|
||||||
@@ -83,7 +89,8 @@ class LambdaReturnValueHintsTest : KotlinLightCodeInsightFixtureTestCase() {
|
|||||||
|
|
||||||
fun testNested() {
|
fun testNested() {
|
||||||
check(
|
check(
|
||||||
"""val x = run hello@{
|
"""
|
||||||
|
val x = run hello@{
|
||||||
if (true) {
|
if (true) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,7 +100,8 @@ class LambdaReturnValueHintsTest : KotlinLightCodeInsightFixtureTestCase() {
|
|||||||
false -> <hint text="^run" />0
|
false -> <hint text="^run" />0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}"""
|
}
|
||||||
|
"""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,7 +114,7 @@ class LambdaReturnValueHintsTest : KotlinLightCodeInsightFixtureTestCase() {
|
|||||||
<hint text="^run" />length ?: 0
|
<hint text="^run" />length ?: 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
""".trimIndent()
|
"""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -125,7 +133,7 @@ class LambdaReturnValueHintsTest : KotlinLightCodeInsightFixtureTestCase() {
|
|||||||
<hint text="^run"/>++test
|
<hint text="^run"/>++test
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
""".trimIndent()
|
"""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user