Add test for light class generated from object
This commit is contained in:
committed by
Michael Bogdanov
parent
a4997e8b31
commit
d630c25f7d
@@ -0,0 +1,21 @@
|
||||
public final class A {
|
||||
public static final int c = 1;
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public static java.lang.String v;
|
||||
public static final pack.A INSTANCE;
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public static final pack.A INSTANCE$;
|
||||
|
||||
public final int getC() { /* compiled code */ }
|
||||
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public final java.lang.String getV() { /* compiled code */ }
|
||||
|
||||
public final void setV(@org.jetbrains.annotations.NotNull java.lang.String p) { /* compiled code */ }
|
||||
|
||||
public final int f() { /* compiled code */ }
|
||||
|
||||
A() { /* compiled code */ }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// pack.A
|
||||
|
||||
package pack
|
||||
|
||||
object A {
|
||||
val c = 1
|
||||
var v = "A"
|
||||
fun f() = 3
|
||||
}
|
||||
@@ -212,6 +212,21 @@ public class KotlinLightClassTestGenerated extends AbstractKotlinLightClassTest
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/asJava/lightClasses/object")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Object extends AbstractKotlinLightClassTest {
|
||||
public void testAllFilesPresentInObject() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/object"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("SimpleObject.kt")
|
||||
public void testSimpleObject() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/object/SimpleObject.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/asJava/lightClasses/publicField")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user