Minor: better asserts in TodoSearchTest.kt
This commit is contained in:
@@ -9,7 +9,6 @@ import com.intellij.psi.search.PsiTodoSearchHelper
|
|||||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||||
import org.jetbrains.kotlin.idea.test.KotlinLightProjectDescriptor
|
import org.jetbrains.kotlin.idea.test.KotlinLightProjectDescriptor
|
||||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||||
import org.junit.Assert
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
class TodoSearchTest : KotlinLightCodeInsightFixtureTestCase() {
|
class TodoSearchTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||||
@@ -22,10 +21,9 @@ class TodoSearchTest : KotlinLightCodeInsightFixtureTestCase() {
|
|||||||
fun testTodoCall() {
|
fun testTodoCall() {
|
||||||
val file = myFixture.configureByFile("todoCall.kt")
|
val file = myFixture.configureByFile("todoCall.kt")
|
||||||
val todoItems = PsiTodoSearchHelper.SERVICE.getInstance(myFixture.project).findTodoItems(file)
|
val todoItems = PsiTodoSearchHelper.SERVICE.getInstance(myFixture.project).findTodoItems(file)
|
||||||
assertEquals(3, todoItems.size)
|
|
||||||
|
|
||||||
val actualItems = todoItems.map { it.textRange.substring(it.file.text) }
|
val actualItems = todoItems.map { it.textRange.substring(it.file.text) }
|
||||||
Assert.assertEquals(
|
assertOrderedEquals(
|
||||||
listOf(
|
listOf(
|
||||||
"TODO(\"Fix me\")",
|
"TODO(\"Fix me\")",
|
||||||
"TODO()",
|
"TODO()",
|
||||||
|
|||||||
Reference in New Issue
Block a user