Added tests for loading private top-level members from compiled code.
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
private class PrivateClass {}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
namespace test
|
||||||
|
|
||||||
|
private final class test.PrivateClass : jet.Any {
|
||||||
|
public final /*constructor*/ fun <init>(): test.PrivateClass
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
private fun topLevelFun() = 0
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
namespace test
|
||||||
|
|
||||||
|
private final fun topLevelFun(): jet.Int
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
private val topLevelVal = 0
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
namespace test
|
||||||
|
|
||||||
|
private final val topLevelVal: jet.Int
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
internal var topLevelVar = 0
|
||||||
|
private set
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
namespace test
|
||||||
|
|
||||||
|
internal final var topLevelVar: jet.Int private set
|
||||||
+20
@@ -727,6 +727,26 @@ public class LazyResolveNamespaceComparingTestGenerated {
|
|||||||
doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/InternalTraitMembersInherited.kt");
|
doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/InternalTraitMembersInherited.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testPrivateClass() throws Exception {
|
||||||
|
doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/PrivateClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testPrivateTopLevelFun() throws Exception {
|
||||||
|
doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/PrivateTopLevelFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testPrivateTopLevelVal() throws Exception {
|
||||||
|
doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/PrivateTopLevelVal.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testTopLevelVarWithPrivateSetter() throws Exception {
|
||||||
|
doTestSinglePackage("compiler/testData/readKotlinBinaryClass/visibility/TopLevelVarWithPrivateSetter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
public static void allTestsPresent(Class<?> clazz, File testDataDir, boolean recursive) {
|
public static void allTestsPresent(Class<?> clazz, File testDataDir, boolean recursive) {
|
||||||
Set<String> methodNames = new HashSet<String>();
|
Set<String> methodNames = new HashSet<String>();
|
||||||
for (Method method : clazz.getDeclaredMethods()) {
|
for (Method method : clazz.getDeclaredMethods()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user