Supported simplest case of signatures propagation in value parameter position.
#KT-2776 in progress
This commit is contained in:
@@ -50,7 +50,9 @@ public abstract class AbstractLoadJavaTest extends TestCaseWithTmpdir {
|
||||
Arrays.asList(javaFile, ExpectedLoadErrorsUtil.ANNOTATION_SOURCE_FILE),
|
||||
tmpdir, myTestRootDisposable, ConfigurationKind.JDK_AND_ANNOTATIONS);
|
||||
NamespaceDescriptor nsb = nsbAndBindingContext.first;
|
||||
ExpectedLoadErrorsUtil.checkForLoadErrors(nsb, nsbAndBindingContext.second);
|
||||
|
||||
|
||||
compareNamespaces(nsa, nsb, DONT_INCLUDE_METHODS_OF_OBJECT, txtFile);
|
||||
ExpectedLoadErrorsUtil.checkForLoadErrors(nsb, nsbAndBindingContext.second);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -439,12 +439,35 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/kotlinSignature/propagation")
|
||||
@InnerTestClasses({Propagation.Return.class})
|
||||
@InnerTestClasses({Propagation.Parameter.class, Propagation.Return.class})
|
||||
public static class Propagation extends AbstractLoadJavaTest {
|
||||
public void testAllFilesPresentInPropagation() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/kotlinSignature/propagation"), "java", true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/kotlinSignature/propagation/parameter")
|
||||
public static class Parameter extends AbstractLoadJavaTest {
|
||||
public void testAllFilesPresentInParameter() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/kotlinSignature/propagation/parameter"), "java", true);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritNullability.java")
|
||||
public void testInheritNullability() throws Exception {
|
||||
doTest("compiler/testData/loadJava/kotlinSignature/propagation/parameter/InheritNullability.java");
|
||||
}
|
||||
|
||||
@TestMetadata("NotNullToNullable.java")
|
||||
public void testNotNullToNullable() throws Exception {
|
||||
doTest("compiler/testData/loadJava/kotlinSignature/propagation/parameter/NotNullToNullable.java");
|
||||
}
|
||||
|
||||
@TestMetadata("NullableToNotNull.java")
|
||||
public void testNullableToNotNull() throws Exception {
|
||||
doTest("compiler/testData/loadJava/kotlinSignature/propagation/parameter/NullableToNotNull.java");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/kotlinSignature/propagation/return")
|
||||
public static class Return extends AbstractLoadJavaTest {
|
||||
@TestMetadata("AddNotNullJavaSubtype.java")
|
||||
@@ -576,6 +599,7 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
|
||||
public static Test innerSuite() {
|
||||
TestSuite suite = new TestSuite("Propagation");
|
||||
suite.addTestSuite(Propagation.class);
|
||||
suite.addTestSuite(Parameter.class);
|
||||
suite.addTestSuite(Return.class);
|
||||
return suite;
|
||||
}
|
||||
|
||||
+25
-1
@@ -1329,12 +1329,35 @@ public class LazyResolveNamespaceComparingTestGenerated extends AbstractLazyReso
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/kotlinSignature/propagation")
|
||||
@InnerTestClasses({Propagation.Return.class})
|
||||
@InnerTestClasses({Propagation.Parameter.class, Propagation.Return.class})
|
||||
public static class Propagation extends AbstractLazyResolveNamespaceComparingTest {
|
||||
public void testAllFilesPresentInPropagation() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/kotlinSignature/propagation"), "kt", true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/kotlinSignature/propagation/parameter")
|
||||
public static class Parameter extends AbstractLazyResolveNamespaceComparingTest {
|
||||
public void testAllFilesPresentInParameter() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/loadJava/kotlinSignature/propagation/parameter"), "kt", true);
|
||||
}
|
||||
|
||||
@TestMetadata("InheritNullability.kt")
|
||||
public void testInheritNullability() throws Exception {
|
||||
doTestSinglePackage("compiler/testData/loadJava/kotlinSignature/propagation/parameter/InheritNullability.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NotNullToNullable.kt")
|
||||
public void testNotNullToNullable() throws Exception {
|
||||
doTestSinglePackage("compiler/testData/loadJava/kotlinSignature/propagation/parameter/NotNullToNullable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NullableToNotNull.kt")
|
||||
public void testNullableToNotNull() throws Exception {
|
||||
doTestSinglePackage("compiler/testData/loadJava/kotlinSignature/propagation/parameter/NullableToNotNull.kt");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/kotlinSignature/propagation/return")
|
||||
public static class Return extends AbstractLazyResolveNamespaceComparingTest {
|
||||
@TestMetadata("AddNotNullJavaSubtype.kt")
|
||||
@@ -1466,6 +1489,7 @@ public class LazyResolveNamespaceComparingTestGenerated extends AbstractLazyReso
|
||||
public static Test innerSuite() {
|
||||
TestSuite suite = new TestSuite("Propagation");
|
||||
suite.addTestSuite(Propagation.class);
|
||||
suite.addTestSuite(Parameter.class);
|
||||
suite.addTestSuite(Return.class);
|
||||
return suite;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user