Refactor: extract test generation regexp into a common util object
This commit is contained in:
committed by
Space Team
parent
881997585a
commit
0295057520
+1
@@ -16,6 +16,7 @@ object TestGeneratorUtil {
|
||||
|
||||
@Language("RegExp") const val KT_WITHOUT_DOTS_IN_NAME = """^([^.]+)\.kt$"""
|
||||
@Language("RegExp") const val KT_WITHOUT_FIR_PREFIX = """^(.+)(?<!\.fir)\.kt$"""
|
||||
@Language("RegExp") const val KT_OR_KTS_WITH_FIR_PREFIX = "^(.+)\\.fir\\.kts?\$"
|
||||
|
||||
@JvmStatic
|
||||
fun escapeForJavaIdentifier(fileName: String): String {
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.jetbrains.kotlin.generators.model.annotation
|
||||
import org.jetbrains.kotlin.generators.tests.IncrementalTestsGeneratorUtil.Companion.IcTestTypes.PURE_KOTLIN
|
||||
import org.jetbrains.kotlin.generators.tests.IncrementalTestsGeneratorUtil.Companion.IcTestTypes.WITH_JAVA
|
||||
import org.jetbrains.kotlin.generators.tests.IncrementalTestsGeneratorUtil.Companion.incrementalJvmTestData
|
||||
import org.jetbrains.kotlin.generators.util.TestGeneratorUtil
|
||||
import org.jetbrains.kotlin.incremental.*
|
||||
import org.jetbrains.kotlin.jvm.abi.AbstractCompareJvmAbiTest
|
||||
import org.jetbrains.kotlin.jvm.abi.AbstractCompileAgainstJvmAbiTest
|
||||
@@ -225,7 +226,7 @@ fun main(args: Array<String>) {
|
||||
}
|
||||
|
||||
generateTestGroupSuiteWithJUnit5 {
|
||||
val excludedFirTestdataPattern = "^(.+)\\.fir\\.kts?\$"
|
||||
val excludedFirTestdataPattern = TestGeneratorUtil.KT_OR_KTS_WITH_FIR_PREFIX
|
||||
|
||||
testGroup("plugins/parcelize/parcelize-compiler/tests-gen", "plugins/parcelize/parcelize-compiler/testData") {
|
||||
testClass<AbstractParcelizeIrBoxTest> {
|
||||
|
||||
Reference in New Issue
Block a user