code cleanup performed (trivial cases)
This commit is contained in:
1 parent
fa4dc45f15
commit
8cd980514b
16 files changed
+86
-81
No files matched your search
@@ -3,6 +3,7 @@ package net.sergeych.lyng.miniast
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertFalse
|
||||
import kotlin.test.assertNotNull
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
class CompletionEngineLightTest {
|
||||
@@ -89,9 +90,9 @@ class CompletionEngineLightTest {
|
||||
""".trimIndent()
|
||||
val items = CompletionEngineLight.completeAtMarkerSuspend(code)
|
||||
val reItem = items.firstOrNull { it.name == "re" }
|
||||
assertTrue(reItem != null, "Expected to find 're' in String members, got: ${items.map { it.name }}")
|
||||
assertNotNull(reItem, "Expected to find 're' in String members, got: ${items.map { it.name }}")
|
||||
// Type text should contain ": Regex"
|
||||
assertTrue(reItem!!.typeText?.contains("Regex") == true, "Expected type text to contain 'Regex', was: ${reItem.typeText}")
|
||||
assertTrue(reItem.typeText?.contains("Regex") == true, "Expected type text to contain 'Regex', was: ${reItem.typeText}")
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -106,8 +107,8 @@ class CompletionEngineLightTest {
|
||||
val names = items.map { it.name }
|
||||
assertTrue(names.isNotEmpty(), "Expected String members for parenthesized literal, got empty list")
|
||||
val reItem = items.firstOrNull { it.name == "re" }
|
||||
assertTrue(reItem != null, "Expected to find 're' for parenthesized String literal, got: $names")
|
||||
assertTrue(reItem!!.typeText?.contains("Regex") == true, "Expected ': Regex' for re(), was: ${reItem.typeText}")
|
||||
assertNotNull(reItem, "Expected to find 're' for parenthesized String literal, got: $names")
|
||||
assertTrue(reItem.typeText?.contains("Regex") == true, "Expected ': Regex' for re(), was: ${reItem.typeText}")
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -120,8 +121,8 @@ class CompletionEngineLightTest {
|
||||
val names = items.map { it.name }
|
||||
assertTrue(names.isNotEmpty(), "Expected String members without explicit imports, got empty list")
|
||||
val reItem = items.firstOrNull { it.name == "re" }
|
||||
assertTrue(reItem != null, "Expected to find 're' without explicit imports, got: $names")
|
||||
assertTrue(reItem!!.typeText?.contains("Regex") == true, "Expected ': Regex' for re() without imports, was: ${reItem.typeText}")
|
||||
assertNotNull(reItem, "Expected to find 're' without explicit imports, got: $names")
|
||||
assertTrue(reItem.typeText?.contains("Regex") == true, "Expected ': Regex' for re() without imports, was: ${reItem.typeText}")
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in new issue
Block a user