Support named arguments for Java constructors annotated with KotlinSignature

This commit is contained in:
Alexander Udalov
2014-03-19 23:08:56 +04:00
parent d2dc54c14f
commit 7d311cdfa0
14 changed files with 189 additions and 43 deletions
@@ -4766,6 +4766,16 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/diagnostics/tests/namedArguments"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("allowForJavaAnnotation.kt")
public void testAllowForJavaAnnotation() throws Exception {
doTest("compiler/testData/diagnostics/tests/namedArguments/allowForJavaAnnotation.kt");
}
@TestMetadata("disallowForJavaConstructor.kt")
public void testDisallowForJavaConstructor() throws Exception {
doTest("compiler/testData/diagnostics/tests/namedArguments/disallowForJavaConstructor.kt");
}
@TestMetadata("disallowForJavaMethods.kt")
public void testDisallowForJavaMethods() throws Exception {
doTest("compiler/testData/diagnostics/tests/namedArguments/disallowForJavaMethods.kt");
@@ -99,6 +99,11 @@ public class JetDiagnosticsTestWithStdLibGenerated extends AbstractJetDiagnostic
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/diagnostics/testsWithStdLib/kotlinSignature"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("constructorNamedArguments.kt")
public void testConstructorNamedArguments() throws Exception {
doTest("compiler/testData/diagnostics/testsWithStdLib/kotlinSignature/constructorNamedArguments.kt");
}
@TestMetadata("parameterNames.kt")
public void testParameterNames() throws Exception {
doTest("compiler/testData/diagnostics/testsWithStdLib/kotlinSignature/parameterNames.kt");
@@ -31,7 +31,7 @@ import org.jetbrains.jet.codegen.generated.AbstractBlackBoxCodegenTest;
/** This class is generated by {@link org.jetbrains.jet.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/testData/codegen/boxWithJava")
@InnerTestClasses({BlackBoxWithJavaCodegenTestGenerated.Annotations.class, BlackBoxWithJavaCodegenTestGenerated.CallableReference.class, BlackBoxWithJavaCodegenTestGenerated.Enum.class, BlackBoxWithJavaCodegenTestGenerated.Functions.class, BlackBoxWithJavaCodegenTestGenerated.InnerClass.class, BlackBoxWithJavaCodegenTestGenerated.Property.class, BlackBoxWithJavaCodegenTestGenerated.Sam.class, BlackBoxWithJavaCodegenTestGenerated.StaticFun.class, BlackBoxWithJavaCodegenTestGenerated.Visibility.class})
@InnerTestClasses({BlackBoxWithJavaCodegenTestGenerated.Annotations.class, BlackBoxWithJavaCodegenTestGenerated.CallableReference.class, BlackBoxWithJavaCodegenTestGenerated.Constructor.class, BlackBoxWithJavaCodegenTestGenerated.Enum.class, BlackBoxWithJavaCodegenTestGenerated.Functions.class, BlackBoxWithJavaCodegenTestGenerated.InnerClass.class, BlackBoxWithJavaCodegenTestGenerated.Property.class, BlackBoxWithJavaCodegenTestGenerated.Sam.class, BlackBoxWithJavaCodegenTestGenerated.StaticFun.class, BlackBoxWithJavaCodegenTestGenerated.Visibility.class})
public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInBoxWithJava() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/codegen/boxWithJava"), Pattern.compile("^(.+)\\.kt$"), true);
@@ -88,6 +88,19 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
}
@TestMetadata("compiler/testData/codegen/boxWithJava/constructor")
public static class Constructor extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInConstructor() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/codegen/boxWithJava/constructor"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("genericConstructor.kt")
public void testGenericConstructor() throws Exception {
doTestWithJava("compiler/testData/codegen/boxWithJava/constructor/genericConstructor.kt");
}
}
@TestMetadata("compiler/testData/codegen/boxWithJava/enum")
public static class Enum extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInEnum() throws Exception {
@@ -552,6 +565,7 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
suite.addTestSuite(BlackBoxWithJavaCodegenTestGenerated.class);
suite.addTestSuite(Annotations.class);
suite.addTestSuite(CallableReference.class);
suite.addTestSuite(Constructor.class);
suite.addTestSuite(Enum.class);
suite.addTestSuite(Functions.class);
suite.addTestSuite(InnerClass.class);