Fix VerifyError for enum constructor with default arguments

This commit is contained in:
Natalia.Ukhorskaya
2012-12-26 19:46:55 +04:00
parent beec5a843e
commit e9d1171d6d
21 changed files with 381 additions and 38 deletions
@@ -53,6 +53,11 @@ public class DefaultArgumentsReflectionTestGenerated extends AbstractDefaultCons
doTest("compiler/testData/codegen/defaultArguments/reflection/classWithVararg.kt");
}
@TestMetadata("enum.kt")
public void testEnum() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/reflection/enum.kt");
}
@TestMetadata("internalClass.kt")
public void testInternalClass() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/reflection/internalClass.kt");
@@ -28,7 +28,7 @@ import org.jetbrains.jet.codegen.generated.AbstractCodegenTest;
/** This class is generated by {@link org.jetbrains.jet.generators.tests.GenerateTests}. DO NOT MODIFY MANUALLY */
@TestMetadata("compiler/testData/codegen/defaultArguments/blackBox")
@InnerTestClasses({DefaultArgumentsBlackBoxTestGenerated.Constructor.class})
@InnerTestClasses({DefaultArgumentsBlackBoxTestGenerated.Constructor.class, DefaultArgumentsBlackBoxTestGenerated.Function.class})
public class DefaultArgumentsBlackBoxTestGenerated extends AbstractCodegenTest {
public void testAllFilesPresentInBlackBox() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/defaultArguments/blackBox"), "kt", true);
@@ -40,6 +40,11 @@ public class DefaultArgumentsBlackBoxTestGenerated extends AbstractCodegenTest {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/defaultArguments/blackBox/constructor"), "kt", true);
}
@TestMetadata("annotation.kt")
public void testAnnotation() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/blackBox/constructor/annotation.kt");
}
@TestMetadata("defArgs1.kt")
public void testDefArgs1() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/blackBox/constructor/defArgs1.kt");
@@ -55,6 +60,31 @@ public class DefaultArgumentsBlackBoxTestGenerated extends AbstractCodegenTest {
doTest("compiler/testData/codegen/defaultArguments/blackBox/constructor/defArgs2.kt");
}
@TestMetadata("doubleDefArgs1InnerClass.kt")
public void testDoubleDefArgs1InnerClass() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/blackBox/constructor/doubleDefArgs1InnerClass.kt");
}
@TestMetadata("enum.kt")
public void testEnum() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/blackBox/constructor/enum.kt");
}
@TestMetadata("enumWithOneDefArg.kt")
public void testEnumWithOneDefArg() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/blackBox/constructor/enumWithOneDefArg.kt");
}
@TestMetadata("enumWithTwoDefArgs.kt")
public void testEnumWithTwoDefArgs() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/blackBox/constructor/enumWithTwoDefArgs.kt");
}
@TestMetadata("enumWithTwoDoubleDefArgs.kt")
public void testEnumWithTwoDoubleDefArgs() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/blackBox/constructor/enumWithTwoDoubleDefArgs.kt");
}
@TestMetadata("kt2852.kt")
public void testKt2852() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/blackBox/constructor/kt2852.kt");
@@ -62,10 +92,69 @@ public class DefaultArgumentsBlackBoxTestGenerated extends AbstractCodegenTest {
}
@TestMetadata("compiler/testData/codegen/defaultArguments/blackBox/function")
public static class Function extends AbstractCodegenTest {
public void testAllFilesPresentInFunction() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/defaultArguments/blackBox/function"), "kt", true);
}
@TestMetadata("extentionFunction.kt")
public void testExtentionFunction() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/blackBox/function/extentionFunction.kt");
}
@TestMetadata("extentionFunctionDouble.kt")
public void testExtentionFunctionDouble() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/blackBox/function/extentionFunctionDouble.kt");
}
@TestMetadata("extentionFunctionDoubleTwoArgs.kt")
public void testExtentionFunctionDoubleTwoArgs() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/blackBox/function/extentionFunctionDoubleTwoArgs.kt");
}
@TestMetadata("extentionFunctionInClassObject.kt")
public void testExtentionFunctionInClassObject() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/blackBox/function/extentionFunctionInClassObject.kt");
}
@TestMetadata("extentionFunctionInObject.kt")
public void testExtentionFunctionInObject() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/blackBox/function/extentionFunctionInObject.kt");
}
@TestMetadata("extentionFunctionWithOneDefArg.kt")
public void testExtentionFunctionWithOneDefArg() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/blackBox/function/extentionFunctionWithOneDefArg.kt");
}
@TestMetadata("funInTrait.kt")
public void testFunInTrait() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/blackBox/function/funInTrait.kt");
}
@TestMetadata("innerExtentionFunction.kt")
public void testInnerExtentionFunction() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/blackBox/function/innerExtentionFunction.kt");
}
@TestMetadata("innerExtentionFunctionDouble.kt")
public void testInnerExtentionFunctionDouble() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/blackBox/function/innerExtentionFunctionDouble.kt");
}
@TestMetadata("innerExtentionFunctionDoubleTwoArgs.kt")
public void testInnerExtentionFunctionDoubleTwoArgs() throws Exception {
doTest("compiler/testData/codegen/defaultArguments/blackBox/function/innerExtentionFunctionDoubleTwoArgs.kt");
}
}
public static Test suite() {
TestSuite suite = new TestSuite("DefaultArgumentsBlackBoxTestGenerated");
suite.addTestSuite(DefaultArgumentsBlackBoxTestGenerated.class);
suite.addTestSuite(Constructor.class);
suite.addTestSuite(Function.class);
return suite;
}
}