diff --git a/compiler/tests-common/org/jetbrains/kotlin/codegen/AbstractLightAnalysisModeTest.kt b/compiler/tests-common/org/jetbrains/kotlin/codegen/AbstractLightAnalysisModeTest.kt index b25ff8c8f16..ec8149b1929 100644 --- a/compiler/tests-common/org/jetbrains/kotlin/codegen/AbstractLightAnalysisModeTest.kt +++ b/compiler/tests-common/org/jetbrains/kotlin/codegen/AbstractLightAnalysisModeTest.kt @@ -52,6 +52,10 @@ abstract class AbstractLightAnalysisModeTest : CodegenTestCase() { assertEquals(fullTxt, liteTxt) } + override fun verifyWithDex(): Boolean { + return false + } + private fun compileWithLightAnalysis(wholeFile: File, files: List, javaFilesDir: File?): String { val boxTestsDir = File("compiler/testData/codegen/box") val relativePath = wholeFile.toRelativeString(boxTestsDir) diff --git a/compiler/tests-common/org/jetbrains/kotlin/codegen/CodegenTestCase.java b/compiler/tests-common/org/jetbrains/kotlin/codegen/CodegenTestCase.java index f6d51d84c2d..5e1f4cbcf9a 100644 --- a/compiler/tests-common/org/jetbrains/kotlin/codegen/CodegenTestCase.java +++ b/compiler/tests-common/org/jetbrains/kotlin/codegen/CodegenTestCase.java @@ -401,7 +401,7 @@ public abstract class CodegenTestCase extends KtUsefulTestCase { try { classFileFactory = generateFiles(myEnvironment, myFiles, getClassBuilderFactory()); - if (DxChecker.RUN_DX_CHECKER) { + if (verifyWithDex() && DxChecker.RUN_DX_CHECKER) { DxChecker.check(classFileFactory); } } @@ -427,6 +427,10 @@ public abstract class CodegenTestCase extends KtUsefulTestCase { return classFileFactory; } + protected boolean verifyWithDex() { + return true; + } + private static boolean verifyAllFilesWithAsm(ClassFileFactory factory, ClassLoader loader) { boolean noErrors = true; for (OutputFile file : ClassFileUtilsKt.getClassFiles(factory)) { diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/AbstractKapt3BuilderModeBytecodeShapeTest.kt b/compiler/tests/org/jetbrains/kotlin/codegen/AbstractKapt3BuilderModeBytecodeShapeTest.kt index d0b8becc102..16d79e11c3c 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/AbstractKapt3BuilderModeBytecodeShapeTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/codegen/AbstractKapt3BuilderModeBytecodeShapeTest.kt @@ -42,4 +42,8 @@ abstract class AbstractKapt3BuilderModeBytecodeShapeTest : CodegenTestCase() { override fun getClassBuilderFactory(): ClassBuilderFactory { return TEST_LIGHT_ANALYSIS } + + override fun verifyWithDex(): Boolean { + return false + } } \ No newline at end of file diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/sourceRetention/AbstractBytecodeListingTestForSourceRetention.kt b/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/sourceRetention/AbstractBytecodeListingTestForSourceRetention.kt index de598d9ad10..a55e3ffcfba 100644 --- a/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/sourceRetention/AbstractBytecodeListingTestForSourceRetention.kt +++ b/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/processing/test/sourceRetention/AbstractBytecodeListingTestForSourceRetention.kt @@ -27,4 +27,8 @@ abstract class AbstractBytecodeListingTestForSourceRetention : AbstractBytecodeL else ClassBuilderFactories.TEST } + + override fun verifyWithDex(): Boolean { + return false + } } \ No newline at end of file