GenerateCompilerTests.kt 32.7 KB
Newer Older
1
/*
N
nikita.movshin 已提交
2 3
 * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
 * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
4 5 6 7 8 9 10 11 12 13 14 15 16
 */

package org.jetbrains.kotlin.generators.tests

import org.jetbrains.kotlin.asJava.AbstractCompilerLightClassTest
import org.jetbrains.kotlin.cfg.AbstractControlFlowTest
import org.jetbrains.kotlin.cfg.AbstractDataFlowTest
import org.jetbrains.kotlin.cfg.AbstractDiagnosticsWithModifiedMockJdkTest
import org.jetbrains.kotlin.cfg.AbstractPseudoValueTest
import org.jetbrains.kotlin.checkers.*
import org.jetbrains.kotlin.checkers.javac.*
import org.jetbrains.kotlin.cli.AbstractCliTest
import org.jetbrains.kotlin.codegen.*
17
import org.jetbrains.kotlin.codegen.debugInformation.AbstractIrLocalVariableTest
18
import org.jetbrains.kotlin.codegen.debugInformation.AbstractIrSteppingTest
19
import org.jetbrains.kotlin.codegen.debugInformation.AbstractLocalVariableTest
20
import org.jetbrains.kotlin.codegen.debugInformation.AbstractSteppingTest
21 22
import org.jetbrains.kotlin.codegen.defaultConstructor.AbstractDefaultArgumentsReflectionTest
import org.jetbrains.kotlin.codegen.flags.AbstractWriteFlagsTest
23
import org.jetbrains.kotlin.codegen.ir.*
24
import org.jetbrains.kotlin.fir.*
R
Roman Golyshev 已提交
25
import org.jetbrains.kotlin.fir.builder.AbstractPartialRawFirBuilderTestCase
I
Ilya Kirillov 已提交
26
import org.jetbrains.kotlin.fir.builder.AbstractRawFirBuilderLazyBodiesTestCase
27
import org.jetbrains.kotlin.fir.builder.AbstractRawFirBuilderSourceElementMappingTestCase
28
import org.jetbrains.kotlin.fir.builder.AbstractRawFirBuilderTestCase
29
import org.jetbrains.kotlin.fir.java.AbstractFirOldFrontendLightClassesTest
30
import org.jetbrains.kotlin.fir.java.AbstractFirTypeEnhancementTest
31
import org.jetbrains.kotlin.fir.java.AbstractOwnFirTypeEnhancementTest
32
import org.jetbrains.kotlin.fir.lightTree.AbstractLightTree2FirConverterTestCase
33
import org.jetbrains.kotlin.generators.tests.generator.testGroupSuite
M
Mikhael Bogdanov 已提交
34
import org.jetbrains.kotlin.generators.util.KT_OR_KTS_WITHOUT_DOTS_IN_NAME
35
import org.jetbrains.kotlin.generators.util.KT_WITHOUT_DOTS_IN_NAME
36 37
import org.jetbrains.kotlin.integration.AbstractAntTaskTest
import org.jetbrains.kotlin.ir.AbstractIrCfgTestCase
38
import org.jetbrains.kotlin.ir.AbstractIrJsTextTestCase
39 40 41
import org.jetbrains.kotlin.ir.AbstractIrSourceRangesTestCase
import org.jetbrains.kotlin.ir.AbstractIrTextTestCase
import org.jetbrains.kotlin.jvm.compiler.*
42
import org.jetbrains.kotlin.jvm.compiler.ir.AbstractIrCompileJavaAgainstKotlinTest
43
import org.jetbrains.kotlin.jvm.compiler.ir.AbstractIrCompileKotlinAgainstJavaTest
M
Mads Ager 已提交
44
import org.jetbrains.kotlin.jvm.compiler.ir.AbstractIrLoadJavaTest
45
import org.jetbrains.kotlin.jvm.compiler.javac.AbstractLoadJavaUsingJavacTest
46 47
import org.jetbrains.kotlin.lexer.kdoc.AbstractKDocLexerTest
import org.jetbrains.kotlin.lexer.kotlin.AbstractKotlinLexerTest
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
import org.jetbrains.kotlin.modules.xml.AbstractModuleXmlParserTest
import org.jetbrains.kotlin.multiplatform.AbstractMultiPlatformIntegrationTest
import org.jetbrains.kotlin.parsing.AbstractParsingTest
import org.jetbrains.kotlin.renderer.AbstractDescriptorRendererTest
import org.jetbrains.kotlin.renderer.AbstractFunctionDescriptorInExpressionRendererTest
import org.jetbrains.kotlin.repl.AbstractReplInterpreterTest
import org.jetbrains.kotlin.resolve.AbstractResolveTest
import org.jetbrains.kotlin.resolve.annotation.AbstractAnnotationParameterTest
import org.jetbrains.kotlin.resolve.calls.AbstractResolvedCallsTest
import org.jetbrains.kotlin.resolve.calls.AbstractResolvedConstructorDelegationCallsTests
import org.jetbrains.kotlin.resolve.constants.evaluate.AbstractCompileTimeConstantEvaluatorTest
import org.jetbrains.kotlin.resolve.constraintSystem.AbstractConstraintSystemTest
import org.jetbrains.kotlin.serialization.AbstractLocalClassProtoTest
import org.jetbrains.kotlin.test.TargetBackend
import org.jetbrains.kotlin.types.AbstractTypeBindingTest
I
Ivan Cilcic 已提交
63
import org.jetbrains.kotlin.visualizer.fir.AbstractFirVisualizer
64
import org.jetbrains.kotlin.visualizer.psi.AbstractPsiVisualizer
65

66
fun main(args: Array<String>) {
67 68
    System.setProperty("java.awt.headless", "true")

69
    val excludedFirTestdataPattern = "^(.+)\\.fir\\.kts?\$"
70

71
    testGroupSuite(args) {
72
        testGroup("compiler/tests-gen", "compiler/testData") {
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
            testClass<AbstractDiagnosticsTestWithFirValidation>(suiteTestClassName = "DiagnosticsTestGenerated") {
                model("diagnostics/tests", pattern = "^(.*)\\.kts?$", excludedPattern = excludedFirTestdataPattern)
                model("codegen/box/diagnostics")
            }

            testClass<AbstractDiagnosticsUsingJavacTest> {
                model("diagnostics/tests", excludedPattern = excludedFirTestdataPattern)
                model("codegen/box/diagnostics")
            }

            testClass<AbstractJavacDiagnosticsTest> {
                model("javac/diagnostics/tests", excludedPattern = excludedFirTestdataPattern)
                model(
                    "javac/diagnostics/tests",
                    testClassName = "TestsWithoutJavac",
                    testMethod = "doTestWithoutJavacWrapper",
                    excludedPattern = excludedFirTestdataPattern
                )
            }

            testClass<AbstractJavacFieldResolutionTest> {
                model("javac/fieldsResolution/tests")
                model("javac/fieldsResolution/tests", testClassName = "TestsWithoutJavac", testMethod = "doTestWithoutJavacWrapper")
            }

            testClass<AbstractDiagnosticsTestWithStdLib> {
                model("diagnostics/testsWithStdLib", excludedPattern = excludedFirTestdataPattern)
            }

            testClass<AbstractDiagnosticsTestWithStdLibUsingJavac> {
                model("diagnostics/testsWithStdLib", excludedPattern = excludedFirTestdataPattern)
            }

            testClass<AbstractDiagnosticsTestWithJsStdLib> {
                model("diagnostics/testsWithJsStdLib")
            }

            testClass<AbstractDiagnosticsTestWithJsStdLibAndBackendCompilation> {
                model("diagnostics/testsWithJsStdLibAndBackendCompilation")
            }

            testClass<AbstractDiagnosticsNativeTest> {
                model("diagnostics/nativeTests")
            }

            testClass<AbstractDiagnosticsWithModifiedMockJdkTest> {
                model("diagnostics/testWithModifiedMockJdk")
            }

            testClass<AbstractDiagnosticsWithJdk9Test> {
                model("diagnostics/testsWithJava9")
            }

D
Denis.Zharkov 已提交
126 127 128 129
            testClass<AbstractDiagnosticsWithJdk15Test> {
                model("diagnostics/testsWithJava15")
            }

130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
            testClass<AbstractDiagnosticsWithUnsignedTypes> {
                model("diagnostics/testsWithUnsignedTypes")
            }

            testClass<AbstractDiagnosticsWithExplicitApi> {
                model("diagnostics/testsWithExplicitApi")
            }

            testClass<AbstractDiagnosticsTestWithOldJvmBackend> {
                model("diagnostics/testsWithJvmBackend", targetBackend = TargetBackend.JVM_OLD)
            }

            testClass<AbstractDiagnosticsTestWithJvmIrBackend> {
                model("diagnostics/testsWithJvmBackend", targetBackend = TargetBackend.JVM_IR)
            }

            testClass<AbstractMultiPlatformIntegrationTest> {
                model("multiplatform", extension = null, recursive = true, excludeParentDirs = true)
            }

            testClass<AbstractForeignAnnotationsTest> {
                model("foreignAnnotations/tests")
            }

            testClass<AbstractForeignAnnotationsNoAnnotationInClasspathTest> {
                model("foreignAnnotations/tests")
            }

            testClass<AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest> {
                model("foreignAnnotations/tests")
            }

            testClass<AbstractJavacForeignAnnotationsTest> {
                model("foreignAnnotations/tests")
            }

            testClass<AbstractResolveTest> {
                model("resolve", extension = "resolve")
            }

            testClass<AbstractResolvedCallsTest> {
                model("resolvedCalls", excludeDirs = listOf("enhancedSignatures"))
            }

            testClass<AbstractResolvedConstructorDelegationCallsTests> {
                model("resolveConstructorDelegationCalls")
            }

            testClass<AbstractConstraintSystemTest> {
                model("constraintSystem", extension = "constraints")
            }

            testClass<AbstractParsingTest> {
                model("psi", testMethod = "doParsingTest", pattern = "^(.*)\\.kts?$")
                model("parseCodeFragment/expression", testMethod = "doExpressionCodeFragmentParsingTest", extension = "kt")
                model("parseCodeFragment/block", testMethod = "doBlockCodeFragmentParsingTest", extension = "kt")
            }

            testClass<AbstractBlackBoxCodegenTest> {
                model("codegen/box", targetBackend = TargetBackend.JVM)
            }

            testClass<AbstractLightAnalysisModeTest> {
                // "ranges/stepped" is excluded because it contains hundreds of generated tests and only have a box() method.
                // There isn't much to be gained from running light analysis tests on them.
                model("codegen/box", targetBackend = TargetBackend.JVM, skipIgnored = true, excludeDirs = listOf("ranges/stepped"))
            }

            testClass<AbstractKapt3BuilderModeBytecodeShapeTest> {
                model("codegen/kapt", targetBackend = TargetBackend.JVM)
            }

            testClass<AbstractAsmLikeInstructionListingTest> {
                model("codegen/asmLike", targetBackend = TargetBackend.JVM)
            }

            testClass<AbstractBlackBoxInlineCodegenTest> {
                model("codegen/boxInline", targetBackend = TargetBackend.JVM)
            }

            testClass<AbstractBlackBoxAgainstJavaCodegenTest> {
                model("codegen/boxAgainstJava")
            }

D
Denis.Zharkov 已提交
214 215 216 217
            testClass<AbstractJdk15BlackBoxCodegenTest> {
                model("codegen/java15/box")
            }

D
Denis.Zharkov 已提交
218
            testClass<AbstractJdk15IrBlackBoxCodegenTest> {
219
                model("codegen/java15/box", targetBackend = TargetBackend.JVM_IR)
D
Denis.Zharkov 已提交
220 221
            }

222 223 224 225
            testClass<AbstractJdk9BlackBoxCodegenTest> {
                model("codegen/java9/box")
            }

226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254
            testClass<AbstractScriptCodegenTest> {
                model("codegen/script", extension = "kts")
            }

            testClass<AbstractCustomScriptCodegenTest> {
                model("codegen/customScript", pattern = "^(.*)$")
            }

            testClass<AbstractBytecodeTextTest> {
                model("codegen/bytecodeText", targetBackend = TargetBackend.JVM)
            }

            testClass<AbstractIrTextTestCase> {
                model("ir/irText")
            }

            testClass<AbstractIrJsTextTestCase> {
                model("ir/irJsText", pattern = "^(.+)\\.kt(s)?\$")
            }

            testClass<AbstractIrCfgTestCase> {
                model("ir/irCfg")
            }

            testClass<AbstractIrSourceRangesTestCase> {
                model("ir/sourceRanges")
            }

            testClass<AbstractBytecodeListingTest> {
255
                model("codegen/bytecodeListing", targetBackend = TargetBackend.JVM)
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325
            }

            testClass<AbstractTopLevelMembersInvocationTest> {
                model("codegen/topLevelMemberInvocation", extension = null, recursive = false)
            }

            testClass<AbstractCheckLocalVariablesTableTest> {
                model("checkLocalVariablesTable", targetBackend = TargetBackend.JVM)
            }

            testClass<AbstractWriteFlagsTest> {
                model("writeFlags", targetBackend = TargetBackend.JVM)
            }

            testClass<AbstractDefaultArgumentsReflectionTest> {
                model("codegen/defaultArguments/reflection")
            }

            testClass<AbstractDumpDeclarationsTest> {
                model("codegen/dumpDeclarations")
            }

            testClass<AbstractLoadJavaTest> {
                model("loadJava/compiledJava", extension = "java", testMethod = "doTestCompiledJava")
                model("loadJava/compiledJavaAndKotlin", extension = "txt", testMethod = "doTestCompiledJavaAndKotlin")
                model(
                    "loadJava/compiledJavaIncludeObjectMethods",
                    extension = "java",
                    testMethod = "doTestCompiledJavaIncludeObjectMethods"
                )
                model("loadJava/compiledKotlin", testMethod = "doTestCompiledKotlin")
                model("loadJava/compiledKotlinWithStdlib", testMethod = "doTestCompiledKotlinWithStdlib")
                model("loadJava/javaAgainstKotlin", extension = "txt", testMethod = "doTestJavaAgainstKotlin")
                model(
                    "loadJava/kotlinAgainstCompiledJavaWithKotlin",
                    extension = "kt",
                    testMethod = "doTestKotlinAgainstCompiledJavaWithKotlin",
                    recursive = false
                )
                model("loadJava/sourceJava", extension = "java", testMethod = "doTestSourceJava")
            }

            testClass<AbstractLoadJavaUsingJavacTest> {
                model("loadJava/compiledJava", extension = "java", testMethod = "doTestCompiledJava")
                model("loadJava/compiledJavaAndKotlin", extension = "txt", testMethod = "doTestCompiledJavaAndKotlin")
                model(
                    "loadJava/compiledJavaIncludeObjectMethods",
                    extension = "java",
                    testMethod = "doTestCompiledJavaIncludeObjectMethods"
                )
                model("loadJava/compiledKotlin", testMethod = "doTestCompiledKotlin")
                model("loadJava/compiledKotlinWithStdlib", testMethod = "doTestCompiledKotlinWithStdlib")
                model("loadJava/javaAgainstKotlin", extension = "txt", testMethod = "doTestJavaAgainstKotlin")
                model(
                    "loadJava/kotlinAgainstCompiledJavaWithKotlin",
                    extension = "kt",
                    testMethod = "doTestKotlinAgainstCompiledJavaWithKotlin",
                    recursive = false
                )
                model("loadJava/sourceJava", extension = "java", testMethod = "doTestSourceJava")
            }

            testClass<AbstractLoadKotlinWithTypeTableTest> {
                model("loadJava/compiledKotlin")
            }

            testClass<AbstractLoadJavaWithPsiClassReadingTest> {
                model("loadJava/compiledJava", extension = "java", testMethod = "doTestCompiledJava")
            }

D
Denis.Zharkov 已提交
326 327 328 329 330 331 332 333 334
            testClass<AbstractLoadJava15Test> {
                model("loadJava15", extension = "java", testMethod = "doTestCompiledJava", testClassName = "CompiledJava")
                model("loadJava15", extension = "java", testMethod = "doTestSourceJava", testClassName = "SourceJava")
            }

            testClass<AbstractLoadJava15WithPsiClassReadingTest> {
                model("loadJava15", extension = "java", testMethod = "doTestCompiledJava")
            }

335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350
            testClass<AbstractCompileJavaAgainstKotlinTest> {
                model(
                    "compileJavaAgainstKotlin",
                    testClassName = "WithoutJavac",
                    testMethod = "doTestWithoutJavac",
                    targetBackend = TargetBackend.JVM
                )
                model(
                    "compileJavaAgainstKotlin",
                    testClassName = "WithJavac",
                    testMethod = "doTestWithJavac",
                    targetBackend = TargetBackend.JVM
                )
            }

            testClass<AbstractCompileKotlinAgainstJavaTest> {
351 352 353 354 355 356 357 358 359 360 361 362
                model(
                    "compileKotlinAgainstJava",
                    testClassName = "WithAPT",
                    testMethod = "doTestWithAPT",
                    targetBackend = TargetBackend.JVM
                )
                model(
                    "compileKotlinAgainstJava",
                    testClassName = "WithoutAPT",
                    testMethod = "doTestWithoutAPT",
                    targetBackend = TargetBackend.JVM
                )
363 364 365 366 367 368
            }

            testClass<AbstractCompileKotlinAgainstKotlinTest> {
                model("compileKotlinAgainstKotlin")
            }

369 370 371 372 373
            testClass<AbstractCompileKotlinAgainstKotlinJdk15Test> {
                model("compileKotlinAgainstKotlinJdk15")
            }

            testClass<AbstractIrCompileKotlinAgainstKotlinJdk15Test> {
374
                model("compileKotlinAgainstKotlinJdk15", targetBackend = TargetBackend.JVM_IR)
375 376
            }

377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462
            testClass<AbstractDescriptorRendererTest> {
                model("renderer")
            }

            testClass<AbstractFunctionDescriptorInExpressionRendererTest> {
                model("renderFunctionDescriptorInExpression")
            }

            testClass<AbstractModuleXmlParserTest> {
                model("modules.xml", extension = "xml")
            }

            testClass<AbstractWriteSignatureTest> {
                model("writeSignature")
            }

            testClass<AbstractCliTest> {
                model("cli/jvm", extension = "args", testMethod = "doJvmTest", recursive = false)
                model("cli/js", extension = "args", testMethod = "doJsTest", recursive = false)
                model("cli/js-dce", extension = "args", testMethod = "doJsDceTest", recursive = false)
                model("cli/metadata", extension = "args", testMethod = "doMetadataTest", recursive = false)
            }

            testClass<AbstractReplInterpreterTest> {
                model("repl", extension = "repl")
            }

            testClass<AbstractAntTaskTest> {
                model("integration/ant/jvm", extension = null, recursive = false, excludeParentDirs = true)
            }

            testClass<AbstractControlFlowTest> {
                model("cfg")
                model("cfgWithStdLib", testMethod = "doTestWithStdLib")
            }

            testClass<AbstractDataFlowTest> {
                model("cfg-variables")
                model("cfgVariablesWithStdLib", testMethod = "doTestWithStdLib")
            }

            testClass<AbstractPseudoValueTest> {
                model("cfg")
                model("cfgWithStdLib", testMethod = "doTestWithStdLib")
                model("cfg-variables")
                model("cfgVariablesWithStdLib", testMethod = "doTestWithStdLib")
            }

            testClass<AbstractAnnotationParameterTest> {
                model("resolveAnnotations/parameters")
            }

            testClass<AbstractCompileTimeConstantEvaluatorTest> {
                model("evaluate/constant", testMethod = "doConstantTest")
                model("evaluate/isPure", testMethod = "doIsPureTest")
                model("evaluate/usesVariableAsConstant", testMethod = "doUsesVariableAsConstantTest")
            }

            testClass<AbstractCompilerLightClassTest> {
                model("asJava/lightClasses", excludeDirs = listOf("local", "ideRegression"), pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME)
            }

            testClass<AbstractTypeBindingTest> {
                model("type/binding")
            }

            testClass<AbstractSteppingTest>(useJunit4 = true) {
                model("debug/stepping", targetBackend = TargetBackend.JVM)
            }

            testClass<AbstractLocalVariableTest>(useJunit4 = true) {
                model("debug/localVariables", targetBackend = TargetBackend.JVM)
            }

            testClass<AbstractLocalClassProtoTest> {
                model("serialization/local")
            }

            testClass<AbstractKDocLexerTest> {
                model("lexer/kdoc")
            }

            testClass<AbstractKotlinLexerTest> {
                model("lexer/kotlin")
            }

463 464 465 466
            testClass<AbstractComposeLikeIrBlackBoxCodegenTest> {
                model("codegen/composeLike", targetBackend = TargetBackend.JVM_IR)
            }

467 468 469 470
            testClass<AbstractComposeLikeIrBytecodeTextTest> {
                model("codegen/composeLikeBytecodeText", targetBackend = TargetBackend.JVM_IR)
            }

471 472 473 474 475 476 477 478 479 480 481 482 483 484 485
            testClass<AbstractIrBlackBoxCodegenTest> {
                model("codegen/box", targetBackend = TargetBackend.JVM_IR, excludeDirs = listOf("oldLanguageVersions"))
            }

            testClass<AbstractIrBlackBoxAgainstJavaCodegenTest> {
                model("codegen/boxAgainstJava", targetBackend = TargetBackend.JVM_IR, excludeDirs = listOf("oldLanguageVersions"))
            }

            testClass<AbstractIrCompileJavaAgainstKotlinTest> {
                model(
                    "compileJavaAgainstKotlin",
                    testClassName = "WithoutJavac",
                    testMethod = "doTestWithoutJavac",
                    targetBackend = TargetBackend.JVM_IR
                )
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506
                model(
                    "compileJavaAgainstKotlin",
                    testClassName = "WithJavac",
                    testMethod = "doTestWithJavac",
                    targetBackend = TargetBackend.JVM_IR
                )
            }

            testClass<AbstractIrCompileKotlinAgainstJavaTest> {
                model(
                    "compileKotlinAgainstJava",
                    testClassName = "WithAPT",
                    testMethod = "doTestWithAPT",
                    targetBackend = TargetBackend.JVM_IR
                )
                model(
                    "compileKotlinAgainstJava",
                    testClassName = "WithoutAPT",
                    testMethod = "doTestWithoutAPT",
                    targetBackend = TargetBackend.JVM_IR
                )
507 508 509 510 511
            }

            testClass<AbstractIrCompileKotlinAgainstKotlinTest> {
                model("compileKotlinAgainstKotlin", targetBackend = TargetBackend.JVM_IR)
            }
512 513 514 515 516 517
            testClass<AbstractJvmIrAgainstOldBoxTest> {
                model("compileKotlinAgainstKotlin", targetBackend = TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD)
            }
            testClass<AbstractJvmOldAgainstIrBoxTest> {
                model(
                    "compileKotlinAgainstKotlin",
518
                    targetBackend = TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR
519 520
                )
            }
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592

            testClass<AbstractIrBytecodeListingTest> {
                model("codegen/bytecodeListing", targetBackend = TargetBackend.JVM_IR)
            }

            testClass<AbstractIrCheckLocalVariablesTableTest> {
                model("checkLocalVariablesTable", targetBackend = TargetBackend.JVM_IR)
            }

            testClass<AbstractIrWriteFlagsTest> {
                model("writeFlags", targetBackend = TargetBackend.JVM_IR)
            }

            testClass<AbstractIrWriteSignatureTest> {
                model("writeSignature", targetBackend = TargetBackend.JVM_IR)
            }

            testClass<AbstractIrLoadJavaTest> {
                model("loadJava/compiledJava", extension = "java", testMethod = "doTestCompiledJava", targetBackend = TargetBackend.JVM_IR)
                model(
                    "loadJava/compiledJavaAndKotlin",
                    extension = "txt",
                    testMethod = "doTestCompiledJavaAndKotlin",
                    targetBackend = TargetBackend.JVM_IR
                )
                model(
                    "loadJava/compiledJavaIncludeObjectMethods",
                    extension = "java",
                    testMethod = "doTestCompiledJavaIncludeObjectMethods",
                    targetBackend = TargetBackend.JVM_IR
                )
                model("loadJava/compiledKotlin", testMethod = "doTestCompiledKotlin", targetBackend = TargetBackend.JVM_IR)
                model(
                    "loadJava/compiledKotlinWithStdlib",
                    testMethod = "doTestCompiledKotlinWithStdlib",
                    targetBackend = TargetBackend.JVM_IR
                )
                model(
                    "loadJava/javaAgainstKotlin",
                    extension = "txt",
                    testMethod = "doTestJavaAgainstKotlin",
                    targetBackend = TargetBackend.JVM_IR
                )
                model(
                    "loadJava/kotlinAgainstCompiledJavaWithKotlin",
                    extension = "kt",
                    testMethod = "doTestKotlinAgainstCompiledJavaWithKotlin",
                    recursive = false,
                    targetBackend = TargetBackend.JVM_IR
                )
                model("loadJava/sourceJava", extension = "java", testMethod = "doTestSourceJava", targetBackend = TargetBackend.JVM_IR)
            }

            testClass<AbstractIrSteppingTest>(useJunit4 = true) {
                model("debug/stepping", targetBackend = TargetBackend.JVM_IR)
            }

            testClass<AbstractIrLocalVariableTest>(useJunit4 = true) {
                model("debug/localVariables", targetBackend = TargetBackend.JVM_IR)
            }

            testClass<AbstractIrBlackBoxInlineCodegenTest> {
                model("codegen/boxInline", targetBackend = TargetBackend.JVM_IR)
            }

            testClass<AbstractIrBytecodeTextTest> {
                model("codegen/bytecodeText", targetBackend = TargetBackend.JVM_IR, excludeDirs = listOf("oldLanguageVersions"))
            }

            testClass<AbstractIrAsmLikeInstructionListingTest> {
                model("codegen/asmLike", targetBackend = TargetBackend.JVM_IR)
            }
593 594 595 596

            testClass<AbstractIrScriptCodegenTest> {
                model("codegen/script", extension = "kts", targetBackend = TargetBackend.JVM_IR)
            }
597 598 599
        }

        testGroup(
600
            "compiler/fir/fir2ir/tests-gen", "compiler/testData",
601 602 603 604 605 606
            testRunnerMethodName = "runTestWithCustomIgnoreDirective",
            additionalRunnerArguments = listOf("\"// IGNORE_BACKEND_FIR: \"")
        ) {
            testClass<AbstractFirBlackBoxCodegenTest> {
                model("codegen/box", targetBackend = TargetBackend.JVM_IR, excludeDirs = listOf("oldLanguageVersions"))
            }
607 608 609 610

            testClass<AbstractFirBlackBoxInlineCodegenTest> {
                model("codegen/boxInline", targetBackend = TargetBackend.JVM_IR, excludeDirs = listOf("oldLanguageVersions"))
            }
611 612 613 614

            testClass<AbstractFirBlackBoxAgainstJavaCodegenTest> {
                model("codegen/boxAgainstJava", targetBackend = TargetBackend.JVM_IR, excludeDirs = listOf("oldLanguageVersions"))
            }
615 616 617 618

            testClass<AbstractFirBytecodeTextTest> {
                model("codegen/bytecodeText", targetBackend = TargetBackend.JVM_IR, excludeDirs = listOf("oldLanguageVersions"))
            }
619 620 621 622

            testClass<AbstractFirCompileKotlinAgainstKotlinTest> {
                model("compileKotlinAgainstKotlin", targetBackend = TargetBackend.JVM_IR)
            }
623 624 625
        }

        testGroup(
626
            "compiler/tests-gen", "compiler/testData",
627 628 629 630 631 632 633 634 635
            testRunnerMethodName = "runTestWithCustomIgnoreDirective",
            additionalRunnerArguments = listOf("\"// IGNORE_BACKEND_MULTI_MODULE: \"")
        ) {
            testClass<AbstractCompileKotlinAgainstInlineKotlinTest> {
                model("codegen/boxInline", targetBackend = TargetBackend.JVM)
            }
            testClass<AbstractIrCompileKotlinAgainstInlineKotlinTest> {
                model("codegen/boxInline", targetBackend = TargetBackend.JVM_IR)
            }
636 637 638 639 640 641
            testClass<AbstractJvmIrAgainstOldBoxInlineTest> {
                model("codegen/boxInline", targetBackend = TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD)
            }
            testClass<AbstractJvmOldAgainstIrBoxInlineTest> {
                model(
                    "codegen/boxInline",
642
                    targetBackend = TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR
643 644
                )
            }
645 646
        }

647
        testGroup("compiler/fir/raw-fir/psi2fir/tests-gen", "compiler/fir/raw-fir/psi2fir/testData") {
648 649 650
            testClass<AbstractRawFirBuilderTestCase> {
                model("rawBuilder", testMethod = "doRawFirTest")
            }
651

652 653 654 655
            testClass<AbstractRawFirBuilderLazyBodiesTestCase> {
                model("rawBuilder", testMethod = "doRawFirTest")
            }

656 657 658
            testClass<AbstractRawFirBuilderSourceElementMappingTestCase> {
                model("sourceElementMapping", testMethod = "doRawFirTest")
            }
659 660
        }

661
        testGroup("compiler/fir/raw-fir/psi2fir/tests-gen", "compiler/fir/raw-fir/psi2fir/testData") {
R
Roman Golyshev 已提交
662 663 664 665 666
            testClass<AbstractPartialRawFirBuilderTestCase> {
                model("partialRawBuilder", testMethod = "doRawFirTest")
            }
        }

667
        testGroup("compiler/fir/raw-fir/light-tree2fir/tests-gen", "compiler/fir/raw-fir/psi2fir/testData") {
668 669 670 671 672
            testClass<AbstractLightTree2FirConverterTestCase> {
                model("rawBuilder")
            }
        }

673
        testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/fir/analysis-tests/testData") {
674 675 676 677 678 679 680
            testClass<AbstractFirDiagnosticsTest> {
                model("resolve", pattern = KT_WITHOUT_DOTS_IN_NAME)
            }

            testClass<AbstractFirDiagnosticsWithLightTreeTest> {
                model("resolve", pattern = KT_WITHOUT_DOTS_IN_NAME)
            }
681 682 683 684 685

            testClass<AbstractLazyBodyIsNotTouchedTilContractsPhaseTest> {
                model("resolve", pattern = KT_WITHOUT_DOTS_IN_NAME)
            }

686 687
        }

688
        testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/fir/analysis-tests/testData") {
689 690 691 692 693
            testClass<AbstractFirDiagnosticsWithStdlibTest> {
                model("resolveWithStdlib", pattern = KT_WITHOUT_DOTS_IN_NAME)
            }
        }

694
        testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/testData") {
695 696 697 698 699
            testClass<AbstractFirLoadCompiledKotlin> {
                model("loadJava/compiledKotlin", extension = "kt")
            }
        }

700
        testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/testData") {
701 702 703 704 705
            testClass<AbstractFirTypeEnhancementTest> {
                model("loadJava/compiledJava", extension = "java")
            }
        }

706
        testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/fir/analysis-tests/testData") {
707 708 709
            testClass<AbstractOwnFirTypeEnhancementTest> {
                model("enhancement", extension = "java")
            }
710 711
        }

712
        testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/testData") {
713 714 715
            testClass<AbstractFirOldFrontendDiagnosticsTest> {
                model("diagnostics/tests", excludedPattern = excludedFirTestdataPattern)
            }
716

717 718 719
            testClass<AbstractFirOldFrontendDiagnosticsTestWithStdlib> {
                model(
                    "diagnostics/testsWithStdLib",
720
                    excludedPattern = excludedFirTestdataPattern
721 722
                )
            }
723 724
        }

725
        testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/fir/analysis-tests/testData") {
726 727 728
            testClass<AbstractFirOldFrontendLightClassesTest> {
                model("lightClasses")
            }
729 730
        }

731
        testGroup(
732
            "compiler/fir/fir2ir/tests-gen", "compiler/testData",
733 734 735 736 737 738
            testRunnerMethodName = "runTestWithCustomIgnoreDirective",
            additionalRunnerArguments = listOf("\"// IGNORE_BACKEND_FIR: \"")
        ) {
            testClass<AbstractFir2IrTextTest> {
                model("ir/irText")
            }
739 740
        }

741
        testGroup("compiler/visualizer/tests-gen", "compiler/fir/raw-fir/psi2fir/testData") {
742 743 744
            testClass<AbstractPsiVisualizer>("PsiVisualizerForRawFirDataGenerated") {
                model("rawBuilder", testMethod = "doFirBuilderDataTest")
            }
745

746 747 748
            testClass<AbstractFirVisualizer>("FirVisualizerForRawFirDataGenerated") {
                model("rawBuilder", testMethod = "doFirBuilderDataTest")
            }
749 750
        }

751
        testGroup("compiler/visualizer/tests-gen", "compiler/visualizer/testData") {
752 753 754
            testClass<AbstractPsiVisualizer>("PsiVisualizerForUncommonCasesGenerated") {
                model("uncommonCases/testFiles", testMethod = "doUncommonCasesTest")
            }
I
Ivan Cilcic 已提交
755

756 757 758
            testClass<AbstractFirVisualizer>("FirVisualizerForUncommonCasesGenerated") {
                model("uncommonCases/testFiles", testMethod = "doUncommonCasesTest")
            }
I
Ivan Cilcic 已提交
759
        }
760

761
        testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/fir/analysis-tests/testData") {
762 763 764 765
            testClass<AbstractExtendedFirDiagnosticsTest> {
                model("extendedCheckers", pattern = KT_WITHOUT_DOTS_IN_NAME)
            }
        }
766

767
        testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/fir/analysis-tests/testData") {
768 769 770 771
            testClass<AbstractExtendedFirWithLightTreeDiagnosticsTest> {
                model("extendedCheckers", pattern = KT_WITHOUT_DOTS_IN_NAME)
            }
        }
772
    }
773
}