From 1dbd6453e06759263fe4d73491432fa21629c330 Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Fri, 5 May 2017 13:38:41 +0300 Subject: [PATCH] Add more stub generator tests for external dependencies --- compiler/testData/ir/irText/stubs/javaEnum.kt | 10 +++++++ .../testData/ir/irText/stubs/javaEnum.txt | 9 ++++++ .../ir/irText/stubs/javaEnum__testmodule.txt | 23 +++++++++++++++ .../ir/irText/stubs/javaInnerClass.kt | 18 ++++++++++++ .../ir/irText/stubs/javaInnerClass.txt | 29 +++++++++++++++++++ .../stubs/javaInnerClass__testmodule.txt | 20 +++++++++++++ .../ir/irText/stubs/javaNestedClass.kt | 13 +++++++++ .../ir/irText/stubs/javaNestedClass.txt | 7 +++++ .../stubs/javaNestedClass__testmodule.txt | 16 ++++++++++ .../ir/irText/stubs/kotlinInnerClass.kt | 13 +++++++++ .../ir/irText/stubs/kotlinInnerClass.txt | 7 +++++ .../kotlinInnerClass__builtinsmodule.txt | 8 +++++ .../stubs/kotlinInnerClass__testmodule.txt | 16 ++++++++++ .../kotlin/ir/AbstractIrGeneratorTestCase.kt | 18 ++++++++---- .../kotlin/ir/AbstractIrTextTestCase.kt | 11 +++++++ .../kotlin/ir/IrTextTestCaseGenerated.java | 24 +++++++++++++++ ...SourceMapGenerationSmokeTestGenerated.java | 1 + 17 files changed, 237 insertions(+), 6 deletions(-) create mode 100644 compiler/testData/ir/irText/stubs/javaEnum.kt create mode 100644 compiler/testData/ir/irText/stubs/javaEnum.txt create mode 100644 compiler/testData/ir/irText/stubs/javaEnum__testmodule.txt create mode 100644 compiler/testData/ir/irText/stubs/javaInnerClass.kt create mode 100644 compiler/testData/ir/irText/stubs/javaInnerClass.txt create mode 100644 compiler/testData/ir/irText/stubs/javaInnerClass__testmodule.txt create mode 100644 compiler/testData/ir/irText/stubs/javaNestedClass.kt create mode 100644 compiler/testData/ir/irText/stubs/javaNestedClass.txt create mode 100644 compiler/testData/ir/irText/stubs/javaNestedClass__testmodule.txt create mode 100644 compiler/testData/ir/irText/stubs/kotlinInnerClass.kt create mode 100644 compiler/testData/ir/irText/stubs/kotlinInnerClass.txt create mode 100644 compiler/testData/ir/irText/stubs/kotlinInnerClass__builtinsmodule.txt create mode 100644 compiler/testData/ir/irText/stubs/kotlinInnerClass__testmodule.txt diff --git a/compiler/testData/ir/irText/stubs/javaEnum.kt b/compiler/testData/ir/irText/stubs/javaEnum.kt new file mode 100644 index 00000000000..09b72162ecb --- /dev/null +++ b/compiler/testData/ir/irText/stubs/javaEnum.kt @@ -0,0 +1,10 @@ +// !DUMP_DEPENDENCIES +// FILE: JEnum.java + +public enum JEnum { + ONE, TWO, THREE; +} + +// FILE: javaEnum.kt + +val test = JEnum.ONE \ No newline at end of file diff --git a/compiler/testData/ir/irText/stubs/javaEnum.txt b/compiler/testData/ir/irText/stubs/javaEnum.txt new file mode 100644 index 00000000000..cdb8fb02f33 --- /dev/null +++ b/compiler/testData/ir/irText/stubs/javaEnum.txt @@ -0,0 +1,9 @@ +FILE /javaEnum.kt + PROPERTY public val test: JEnum + FIELD PROPERTY_BACKING_FIELD public val test: JEnum + EXPRESSION_BODY + GET_ENUM 'ONE' type=JEnum + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): JEnum + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): JEnum' + GET_FIELD 'test: JEnum' type=JEnum origin=null diff --git a/compiler/testData/ir/irText/stubs/javaEnum__testmodule.txt b/compiler/testData/ir/irText/stubs/javaEnum__testmodule.txt new file mode 100644 index 00000000000..561ddf5cafa --- /dev/null +++ b/compiler/testData/ir/irText/stubs/javaEnum__testmodule.txt @@ -0,0 +1,23 @@ +MODULE_FRAGMENT + EXTERNAL_PACKAGE_FRAGMENT + CLASS IR_EXTERNAL_DECLARATION_STUB ENUM_CLASS JEnum + CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB public constructor JEnum() + ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB enum entry ONE + ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB enum entry THREE + ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB enum entry TWO + FUN IR_EXTERNAL_DECLARATION_STUB protected final override fun clone(): kotlin.Any + FUN IR_EXTERNAL_DECLARATION_STUB protected/*protected and package*/ final override fun finalize(): kotlin.Unit + FUN IR_EXTERNAL_DECLARATION_STUB public final override fun getDeclaringClass(): java.lang.Class! + FUN IR_EXTERNAL_DECLARATION_STUB public final override fun compareTo(other: JEnum!): kotlin.Int + VALUE_PARAMETER value-parameter other: JEnum! + FUN IR_EXTERNAL_DECLARATION_STUB public final override fun equals(other: kotlin.Any?): kotlin.Boolean + VALUE_PARAMETER value-parameter other: kotlin.Any? + FUN IR_EXTERNAL_DECLARATION_STUB public final override fun hashCode(): kotlin.Int + PROPERTY IR_EXTERNAL_DECLARATION_STUB public final override val name: kotlin.String + FUN IR_EXTERNAL_DECLARATION_STUB public final override fun (): kotlin.String + PROPERTY IR_EXTERNAL_DECLARATION_STUB public final override val ordinal: kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public final override fun (): kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun toString(): kotlin.String + FUN IR_EXTERNAL_DECLARATION_STUB public final fun valueOf(value: kotlin.String): JEnum + VALUE_PARAMETER value-parameter value: kotlin.String + FUN IR_EXTERNAL_DECLARATION_STUB public final fun values(): kotlin.Array diff --git a/compiler/testData/ir/irText/stubs/javaInnerClass.kt b/compiler/testData/ir/irText/stubs/javaInnerClass.kt new file mode 100644 index 00000000000..3f8465ce5fb --- /dev/null +++ b/compiler/testData/ir/irText/stubs/javaInnerClass.kt @@ -0,0 +1,18 @@ +// !DUMP_DEPENDENCIES +// FILE: J.java + +public class J { + public class JInner { + public void foo() {} + public int z = 0; + } + public void bar() {} + public int x = 0; +} + +// FILE: javaInnerClass.kt + +class Test1 : J() { + val test = JInner() +} + diff --git a/compiler/testData/ir/irText/stubs/javaInnerClass.txt b/compiler/testData/ir/irText/stubs/javaInnerClass.txt new file mode 100644 index 00000000000..79f68461936 --- /dev/null +++ b/compiler/testData/ir/irText/stubs/javaInnerClass.txt @@ -0,0 +1,29 @@ +FILE /javaInnerClass.kt + CLASS CLASS Test1 + $this: VALUE_PARAMETER this@Test1: Test1 + CONSTRUCTOR public constructor Test1() + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'constructor J()' + INSTANCE_INITIALIZER_CALL classDescriptor='Test1' + PROPERTY public final val test: J.JInner + FIELD PROPERTY_BACKING_FIELD public final val test: J.JInner + EXPRESSION_BODY + CALL 'constructor JInner()' type=J.JInner origin=null + $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): J.JInner + $this: VALUE_PARAMETER this@Test1: Test1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): J.JInner' + GET_FIELD 'test: J.JInner' type=J.JInner origin=null + receiver: GET_VAR 'this@Test1: Test1' type=Test1 origin=null + PROPERTY FAKE_OVERRIDE public final override var x: kotlin.Int + FIELD FAKE_OVERRIDE public final override var x: kotlin.Int + FUN FAKE_OVERRIDE public open override fun bar(): kotlin.Unit + $this: VALUE_PARAMETER this@J: J + FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean + $this: VALUE_PARAMETER this@Any: Any + VALUE_PARAMETER value-parameter other: kotlin.Any? + FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int + $this: VALUE_PARAMETER this@Any: Any + FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String + $this: VALUE_PARAMETER this@Any: Any diff --git a/compiler/testData/ir/irText/stubs/javaInnerClass__testmodule.txt b/compiler/testData/ir/irText/stubs/javaInnerClass__testmodule.txt new file mode 100644 index 00000000000..60c46a168ac --- /dev/null +++ b/compiler/testData/ir/irText/stubs/javaInnerClass__testmodule.txt @@ -0,0 +1,20 @@ +MODULE_FRAGMENT + EXTERNAL_PACKAGE_FRAGMENT + CLASS IR_EXTERNAL_DECLARATION_STUB CLASS J + CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB public constructor J() + PROPERTY IR_EXTERNAL_DECLARATION_STUB public final var x: kotlin.Int + FIELD IR_EXTERNAL_DECLARATION_STUB public final var x: kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public open fun bar(): kotlin.Unit + CLASS IR_EXTERNAL_DECLARATION_STUB CLASS JInner + CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB public constructor JInner() + PROPERTY IR_EXTERNAL_DECLARATION_STUB public final var z: kotlin.Int + FIELD IR_EXTERNAL_DECLARATION_STUB public final var z: kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public open fun foo(): kotlin.Unit + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun equals(other: kotlin.Any?): kotlin.Boolean + VALUE_PARAMETER value-parameter other: kotlin.Any? + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun hashCode(): kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun toString(): kotlin.String + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun equals(other: kotlin.Any?): kotlin.Boolean + VALUE_PARAMETER value-parameter other: kotlin.Any? + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun hashCode(): kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/stubs/javaNestedClass.kt b/compiler/testData/ir/irText/stubs/javaNestedClass.kt new file mode 100644 index 00000000000..9b41e6116e4 --- /dev/null +++ b/compiler/testData/ir/irText/stubs/javaNestedClass.kt @@ -0,0 +1,13 @@ +// !DUMP_DEPENDENCIES +// FILE: J.java + +public class J { + public static class JJ { + public void foo() {} + public static void bar() {} + } +} + + +// FILE: javaNestedClass.kt +fun test(jj: J.JJ) = jj.foo() \ No newline at end of file diff --git a/compiler/testData/ir/irText/stubs/javaNestedClass.txt b/compiler/testData/ir/irText/stubs/javaNestedClass.txt new file mode 100644 index 00000000000..bcc32027162 --- /dev/null +++ b/compiler/testData/ir/irText/stubs/javaNestedClass.txt @@ -0,0 +1,7 @@ +FILE /javaNestedClass.kt + FUN public fun test(jj: J.JJ): kotlin.Unit + VALUE_PARAMETER value-parameter jj: J.JJ + BLOCK_BODY + RETURN type=kotlin.Nothing from='test(J.JJ): Unit' + CALL 'foo(): Unit' type=kotlin.Unit origin=null + $this: GET_VAR 'value-parameter jj: J.JJ' type=J.JJ origin=null diff --git a/compiler/testData/ir/irText/stubs/javaNestedClass__testmodule.txt b/compiler/testData/ir/irText/stubs/javaNestedClass__testmodule.txt new file mode 100644 index 00000000000..e9f96c3baa9 --- /dev/null +++ b/compiler/testData/ir/irText/stubs/javaNestedClass__testmodule.txt @@ -0,0 +1,16 @@ +MODULE_FRAGMENT + EXTERNAL_PACKAGE_FRAGMENT + CLASS IR_EXTERNAL_DECLARATION_STUB CLASS J + CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB public constructor J() + CLASS IR_EXTERNAL_DECLARATION_STUB CLASS JJ + CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB public constructor JJ() + FUN IR_EXTERNAL_DECLARATION_STUB public open fun foo(): kotlin.Unit + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun equals(other: kotlin.Any?): kotlin.Boolean + VALUE_PARAMETER value-parameter other: kotlin.Any? + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun hashCode(): kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun toString(): kotlin.String + FUN IR_EXTERNAL_DECLARATION_STUB public open fun bar(): kotlin.Unit + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun equals(other: kotlin.Any?): kotlin.Boolean + VALUE_PARAMETER value-parameter other: kotlin.Any? + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun hashCode(): kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun toString(): kotlin.String diff --git a/compiler/testData/ir/irText/stubs/kotlinInnerClass.kt b/compiler/testData/ir/irText/stubs/kotlinInnerClass.kt new file mode 100644 index 00000000000..a358b5441bd --- /dev/null +++ b/compiler/testData/ir/irText/stubs/kotlinInnerClass.kt @@ -0,0 +1,13 @@ +// !DUMP_DEPENDENCIES + +// FILE: external.kt +// EXTERNAL_FILE +class Outer { + inner class Inner { + fun foo() {} + } + fun bar() {} +} + +// FILE: kotlinInnerClass.kt +fun test(inner: Outer.Inner) = inner.foo() \ No newline at end of file diff --git a/compiler/testData/ir/irText/stubs/kotlinInnerClass.txt b/compiler/testData/ir/irText/stubs/kotlinInnerClass.txt new file mode 100644 index 00000000000..c875167ad20 --- /dev/null +++ b/compiler/testData/ir/irText/stubs/kotlinInnerClass.txt @@ -0,0 +1,7 @@ +FILE /kotlinInnerClass.kt + FUN public fun test(inner: Outer.Inner): kotlin.Unit + VALUE_PARAMETER value-parameter inner: Outer.Inner + BLOCK_BODY + RETURN type=kotlin.Nothing from='test(Outer.Inner): Unit' + CALL 'foo(): Unit' type=kotlin.Unit origin=null + $this: GET_VAR 'value-parameter inner: Outer.Inner' type=Outer.Inner origin=null diff --git a/compiler/testData/ir/irText/stubs/kotlinInnerClass__builtinsmodule.txt b/compiler/testData/ir/irText/stubs/kotlinInnerClass__builtinsmodule.txt new file mode 100644 index 00000000000..604017c4955 --- /dev/null +++ b/compiler/testData/ir/irText/stubs/kotlinInnerClass__builtinsmodule.txt @@ -0,0 +1,8 @@ +MODULE_FRAGMENT + EXTERNAL_PACKAGE_FRAGMENT kotlin + CLASS IR_EXTERNAL_DECLARATION_STUB CLASS Any + CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB public constructor Any() + FUN IR_EXTERNAL_DECLARATION_STUB public open fun hashCode(): kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public open fun toString(): kotlin.String + FUN IR_EXTERNAL_DECLARATION_STUB public open operator fun equals(other: kotlin.Any?): kotlin.Boolean + VALUE_PARAMETER value-parameter other: kotlin.Any? diff --git a/compiler/testData/ir/irText/stubs/kotlinInnerClass__testmodule.txt b/compiler/testData/ir/irText/stubs/kotlinInnerClass__testmodule.txt new file mode 100644 index 00000000000..924bd58330b --- /dev/null +++ b/compiler/testData/ir/irText/stubs/kotlinInnerClass__testmodule.txt @@ -0,0 +1,16 @@ +MODULE_FRAGMENT + EXTERNAL_PACKAGE_FRAGMENT + CLASS IR_EXTERNAL_DECLARATION_STUB CLASS Outer + CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB public constructor Outer() + FUN IR_EXTERNAL_DECLARATION_STUB public final fun bar(): kotlin.Unit + CLASS IR_EXTERNAL_DECLARATION_STUB CLASS Inner + CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB public constructor Inner() + FUN IR_EXTERNAL_DECLARATION_STUB public final fun foo(): kotlin.Unit + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun equals(other: kotlin.Any?): kotlin.Boolean + VALUE_PARAMETER value-parameter other: kotlin.Any? + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun hashCode(): kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun toString(): kotlin.String + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun equals(other: kotlin.Any?): kotlin.Boolean + VALUE_PARAMETER value-parameter other: kotlin.Any? + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun hashCode(): kotlin.Int + FUN IR_EXTERNAL_DECLARATION_STUB public open override fun toString(): kotlin.String diff --git a/compiler/tests/org/jetbrains/kotlin/ir/AbstractIrGeneratorTestCase.kt b/compiler/tests/org/jetbrains/kotlin/ir/AbstractIrGeneratorTestCase.kt index bc43df153b8..fe4eb06f7ac 100644 --- a/compiler/tests/org/jetbrains/kotlin/ir/AbstractIrGeneratorTestCase.kt +++ b/compiler/tests/org/jetbrains/kotlin/ir/AbstractIrGeneratorTestCase.kt @@ -66,7 +66,7 @@ abstract class AbstractIrGeneratorTestCase : CodegenTestCase() { addReflect -> ConfigurationKind.ALL addRuntime -> ConfigurationKind.NO_KOTLIN_REFLECT else -> ConfigurationKind.JDK_ONLY - }; + } val configuration = createConfiguration( configurationKind, jdkKind, @@ -80,10 +80,10 @@ abstract class AbstractIrGeneratorTestCase : CodegenTestCase() { protected abstract fun doTest(wholeFile: File, testFiles: List) - protected fun generateIrModule(ignoreErrors: Boolean = false): IrModuleFragment { + protected fun generateIrModule(ignoreErrors: Boolean = false, shouldGenerate: (KtFile) -> Boolean = { true }): IrModuleFragment { assert(myFiles != null) { "myFiles not initialized" } assert(myEnvironment != null) { "myEnvironment not initialized" } - return generateIrModule(myFiles.psiFiles, myEnvironment, Psi2IrTranslator(Psi2IrConfiguration(ignoreErrors))) + return generateIrModule(myFiles.psiFiles, myEnvironment, Psi2IrTranslator(Psi2IrConfiguration(ignoreErrors)), shouldGenerate) } protected fun generateIrFilesAsSingleModule(testFiles: List, ignoreErrors: Boolean = false): Map { @@ -109,13 +109,19 @@ abstract class AbstractIrGeneratorTestCase : CodegenTestCase() { return textFile } - fun generateIrModule(ktFiles: List, environment: KotlinCoreEnvironment, psi2ir: Psi2IrTranslator): IrModuleFragment { - val analysisResult = JvmResolveUtil.analyze(ktFiles, environment) + fun generateIrModule( + ktFilesToAnalyze: List, + environment: KotlinCoreEnvironment, + psi2ir: Psi2IrTranslator, + shouldGenerate: (KtFile) -> Boolean + ): IrModuleFragment { + val analysisResult = JvmResolveUtil.analyze(ktFilesToAnalyze, environment) if (!psi2ir.configuration.ignoreErrors) { analysisResult.throwIfError() AnalyzingUtils.throwExceptionOnErrors(analysisResult.bindingContext) } - return generateIrModule(ktFiles, analysisResult.moduleDescriptor, analysisResult.bindingContext, psi2ir) + val fileToGenerate = ktFilesToAnalyze.filter { shouldGenerate(it) } + return generateIrModule(fileToGenerate, analysisResult.moduleDescriptor, analysisResult.bindingContext, psi2ir) } fun generateIrModule(ktFiles: List, moduleDescriptor: ModuleDescriptor, bindingContext: BindingContext, ignoreErrors: Boolean = false) = diff --git a/compiler/tests/org/jetbrains/kotlin/ir/AbstractIrTextTestCase.kt b/compiler/tests/org/jetbrains/kotlin/ir/AbstractIrTextTestCase.kt index c6b2a56c91e..1a315276985 100644 --- a/compiler/tests/org/jetbrains/kotlin/ir/AbstractIrTextTestCase.kt +++ b/compiler/tests/org/jetbrains/kotlin/ir/AbstractIrTextTestCase.kt @@ -29,6 +29,7 @@ import org.jetbrains.kotlin.ir.symbols.IrSymbol import org.jetbrains.kotlin.ir.util.* import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid +import org.jetbrains.kotlin.psi.KtFile import org.jetbrains.kotlin.test.KotlinTestUtils import org.jetbrains.kotlin.utils.rethrow import java.io.File @@ -60,6 +61,8 @@ abstract class AbstractIrTextTestCase : AbstractIrGeneratorTestCase() { } protected fun doTestIrFileAgainstExpectations(dir: File, testFile: TestFile, irFile: IrFile) { + if (testFile.isExternalFile()) return + val expectations = parseExpectations(dir, testFile) val irFileDump = irFile.dump() @@ -234,9 +237,17 @@ abstract class AbstractIrTextTestCase : AbstractIrGeneratorTestCase() { private val DUMP_DEPENDENCIES_PATTERN = Regex("""// !DUMP_DEPENDENCIES""") + private val EXTERNAL_FILE_PATTERN = Regex("""// EXTERNAL_FILE""") + internal fun shouldDumpDependencies(wholeFile: File): Boolean = DUMP_DEPENDENCIES_PATTERN.containsMatchIn(wholeFile.readText()) + internal fun TestFile.isExternalFile() = + EXTERNAL_FILE_PATTERN.containsMatchIn(content) + + internal fun KtFile.isExternalFile() = + EXTERNAL_FILE_PATTERN.containsMatchIn(text) + internal fun parseExpectations(dir: File, testFile: TestFile): Expectations { val regexps = ArrayList() val treeFiles = ArrayList() diff --git a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java index 52633dc4a73..1c1b0b40f89 100644 --- a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java @@ -1103,6 +1103,30 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irText/stubs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } + @TestMetadata("javaEnum.kt") + public void testJavaEnum() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/stubs/javaEnum.kt"); + doTest(fileName); + } + + @TestMetadata("javaInnerClass.kt") + public void testJavaInnerClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/stubs/javaInnerClass.kt"); + doTest(fileName); + } + + @TestMetadata("javaNestedClass.kt") + public void testJavaNestedClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/stubs/javaNestedClass.kt"); + doTest(fileName); + } + + @TestMetadata("kotlinInnerClass.kt") + public void testKotlinInnerClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/stubs/kotlinInnerClass.kt"); + doTest(fileName); + } + @TestMetadata("simple.kt") public void testSimple() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/stubs/simple.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/SourceMapGenerationSmokeTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/SourceMapGenerationSmokeTestGenerated.java index d9470ebf8c7..dccfefd35fb 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/SourceMapGenerationSmokeTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/SourceMapGenerationSmokeTestGenerated.java @@ -53,4 +53,5 @@ public class SourceMapGenerationSmokeTestGenerated extends AbstractSourceMapGene String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/sourcemap/methodCallInMethod.kt"); doTest(fileName); } + }