Implement package protected visibility
This commit is contained in:
@@ -30,7 +30,7 @@ import org.jetbrains.jet.codegen.AbstractJavaVisibilityTest;
|
||||
/** This class is generated by {@link org.jetbrains.jet.generators.tests.GenerateTests}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("compiler/testData/codegen/visibility")
|
||||
@InnerTestClasses({JavaVisibilityTestGenerated.Package.class})
|
||||
@InnerTestClasses({JavaVisibilityTestGenerated.Package.class, JavaVisibilityTestGenerated.Protected_and_package.class})
|
||||
public class JavaVisibilityTestGenerated extends AbstractJavaVisibilityTest {
|
||||
public void testAllFilesPresentInVisibility() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/visibility"), "kt", true);
|
||||
@@ -59,10 +59,39 @@ public class JavaVisibilityTestGenerated extends AbstractJavaVisibilityTest {
|
||||
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/visibility/protected_and_package")
|
||||
public static class Protected_and_package extends AbstractJavaVisibilityTest {
|
||||
public void testAllFilesPresentInProtected_and_package() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/visibility/protected_and_package"), "kt", true);
|
||||
}
|
||||
|
||||
@TestMetadata("overrideProtectedFunInPackage.kt")
|
||||
public void testOverrideProtectedFunInPackage() throws Exception {
|
||||
blackBoxFileWithJavaByFullPath("compiler/testData/codegen/visibility/protected_and_package/overrideProtectedFunInPackage.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("protectedFunInPackage.kt")
|
||||
public void testProtectedFunInPackage() throws Exception {
|
||||
blackBoxFileWithJavaByFullPath("compiler/testData/codegen/visibility/protected_and_package/protectedFunInPackage.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("protectedPropertyInPackage.kt")
|
||||
public void testProtectedPropertyInPackage() throws Exception {
|
||||
blackBoxFileWithJavaByFullPath("compiler/testData/codegen/visibility/protected_and_package/protectedPropertyInPackage.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("protectedStaticClass.kt")
|
||||
public void testProtectedStaticClass() throws Exception {
|
||||
blackBoxFileWithJavaByFullPath("compiler/testData/codegen/visibility/protected_and_package/protectedStaticClass.kt");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
TestSuite suite = new TestSuite("JavaVisibilityTestGenerated");
|
||||
suite.addTestSuite(JavaVisibilityTestGenerated.class);
|
||||
suite.addTestSuite(Package.class);
|
||||
suite.addTestSuite(Protected_and_package.class);
|
||||
return suite;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,6 +100,24 @@ public final class LoadJavaCustomTest extends KotlinTestWithEnvironment {
|
||||
dir + "ConstructorInProtectedStaticNestedClass.java");
|
||||
}
|
||||
|
||||
public void testProtectedPackageFun() throws Exception {
|
||||
String dir = PATH + "/protectedPackageVisibility/";
|
||||
doTest(dir + "ProtectedPackageFun.txt",
|
||||
dir + "ProtectedPackageFun.java");
|
||||
}
|
||||
|
||||
public void testProtectedPackageConstructor() throws Exception {
|
||||
String dir = PATH + "/protectedPackageVisibility/";
|
||||
doTest(dir + "ProtectedPackageConstructor.txt",
|
||||
dir + "ProtectedPackageConstructor.java");
|
||||
}
|
||||
|
||||
public void testProtectedPackageProperty() throws Exception {
|
||||
String dir = PATH + "/protectedPackageVisibility/";
|
||||
doTest(dir + "ProtectedPackageProperty.txt",
|
||||
dir + "ProtectedPackageProperty.java");
|
||||
}
|
||||
|
||||
public void testStaticFinal() throws Exception {
|
||||
String dir = "/staticFinal/";
|
||||
doTest(PATH + dir + "expected.txt",
|
||||
|
||||
Reference in New Issue
Block a user