Fix tests after new Continuation API support

#KT-24863 Fixed
This commit is contained in:
Denis Zharkov
2018-07-05 10:20:56 +03:00
parent 170086250b
commit 820506d9c6
59 changed files with 1813 additions and 382 deletions
@@ -8,6 +8,7 @@ package org.jetbrains.kotlin.generators.util
import org.jetbrains.kotlin.generators.tests.generator.MethodModel
import org.jetbrains.kotlin.generators.tests.generator.RunTestMethodWithPackageReplacementModel
import org.jetbrains.kotlin.generators.tests.generator.SimpleTestMethodModel
import org.jetbrains.kotlin.test.InTextDirectivesUtils
import org.jetbrains.kotlin.test.KotlinTestUtils
import org.jetbrains.kotlin.test.TargetBackend
import org.jetbrains.kotlin.utils.Printer
@@ -42,7 +43,7 @@ class CoroutinesTestModel(
}
fun isCommonCoroutineTest(file: File): Boolean {
return file.readLines().any { it.startsWith("// COMMON_COROUTINES_TEST") }
return InTextDirectivesUtils.isDirectiveDefined(file.readText(), "COMMON_COROUTINES_TEST")
}
fun createCommonCoroutinesTestMethodModels(
@@ -86,4 +87,4 @@ fun createCommonCoroutinesTestMethodModels(
false
)
)
}
}