diff --git a/compiler/testData/ir/irText/classes/classes.kt b/compiler/testData/ir/irText/classes/classes.kt new file mode 100644 index 00000000000..d53e2610b76 --- /dev/null +++ b/compiler/testData/ir/irText/classes/classes.kt @@ -0,0 +1,9 @@ +class TestClass + +interface TestInterface + +object TestObject + +annotation class TestAnnotationClass + +enum class TestEnumClass diff --git a/compiler/testData/ir/irText/classes/classes.txt b/compiler/testData/ir/irText/classes/classes.txt new file mode 100644 index 00000000000..eb5712aa5c8 --- /dev/null +++ b/compiler/testData/ir/irText/classes/classes.txt @@ -0,0 +1,14 @@ +FILE /classes.kt + CLASS CLASS TestClass + FUN public constructor TestClass() + BLOCK_BODY + CLASS INTERFACE TestInterface + CLASS OBJECT TestObject + FUN private constructor TestObject() + BLOCK_BODY + CLASS ANNOTATION_CLASS TestAnnotationClass + FUN public constructor TestAnnotationClass() + BLOCK_BODY + CLASS ENUM_CLASS TestEnumClass + FUN private constructor TestEnumClass() + BLOCK_BODY diff --git a/compiler/testData/ir/irText/classes/companionObject.kt b/compiler/testData/ir/irText/classes/companionObject.kt new file mode 100644 index 00000000000..d0484272732 --- /dev/null +++ b/compiler/testData/ir/irText/classes/companionObject.kt @@ -0,0 +1,8 @@ +class Test1 { + companion object +} + +class Test2 { + companion object Named +} + diff --git a/compiler/testData/ir/irText/classes/companionObject.txt b/compiler/testData/ir/irText/classes/companionObject.txt new file mode 100644 index 00000000000..1ac08d27a0d --- /dev/null +++ b/compiler/testData/ir/irText/classes/companionObject.txt @@ -0,0 +1,13 @@ +FILE /companionObject.kt + CLASS CLASS Test1 + FUN public constructor Test1() + BLOCK_BODY + CLASS OBJECT Companion + FUN private constructor Companion() + BLOCK_BODY + CLASS CLASS Test2 + FUN public constructor Test2() + BLOCK_BODY + CLASS OBJECT Named + FUN private constructor Named() + BLOCK_BODY diff --git a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java index e19b35fca29..2c5eff60a0c 100644 --- a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java @@ -55,6 +55,18 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { doTest(fileName); } + @TestMetadata("classes.kt") + public void testClasses() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/classes.kt"); + doTest(fileName); + } + + @TestMetadata("companionObject.kt") + public void testCompanionObject() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/companionObject.kt"); + doTest(fileName); + } + @TestMetadata("delegatingConstructorCallsInSecondaryConstructors.kt") public void testDelegatingConstructorCallsInSecondaryConstructors() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/delegatingConstructorCallsInSecondaryConstructors.kt");