Types are no more rendered for annotation arguments + a swarm of tests corrected accordingly

This commit is contained in:
Mikhail Glukhikh
2015-06-29 19:54:43 +03:00
parent dde295011b
commit bae9a7d7f8
213 changed files with 604 additions and 552 deletions
@@ -21,73 +21,73 @@ import java.io.IOException;
public class AnnotationDescriptorResolveTest extends AbstractAnnotationDescriptorResolveTest {
public void testIntAnnotation() throws IOException {
String content = getContent("AnnInt(1)");
String expectedAnnotation = "AnnInt(a = IntegerValueType(1): IntegerValueType(1))";
String expectedAnnotation = "AnnInt(a = IntegerValueType(1))";
doTest(content, expectedAnnotation);
}
public void testStringAnnotation() throws IOException {
String content = getContent("AnnString(\"test\")");
String expectedAnnotation = "AnnString(a = \"test\": String)";
String expectedAnnotation = "AnnString(a = \"test\")";
doTest(content, expectedAnnotation);
}
public void testEnumAnnotation() throws IOException {
String content = getContent("AnnEnum(MyEnum.A)");
String expectedAnnotation = "AnnEnum(a = MyEnum.A: MyEnum)";
String expectedAnnotation = "AnnEnum(a = MyEnum.A)";
doTest(content, expectedAnnotation);
}
public void testQualifiedEnumAnnotation() throws IOException {
String content = getContent("AnnEnum(MyEnum.A)");
String expectedAnnotation = "AnnEnum(a = MyEnum.A: MyEnum)";
String expectedAnnotation = "AnnEnum(a = MyEnum.A)";
doTest(content, expectedAnnotation);
}
public void testUnqualifiedEnumAnnotation() throws IOException {
String content = getContent("AnnEnum(A)");
String expectedAnnotation = "AnnEnum(a = MyEnum.A: MyEnum)";
String expectedAnnotation = "AnnEnum(a = MyEnum.A)";
doTest(content, expectedAnnotation);
}
public void testIntArrayAnnotation() throws IOException {
String content = getContent("AnnIntArray(intArray(1, 2))");
String expectedAnnotation = "AnnIntArray(a = {IntegerValueType(1), IntegerValueType(2)}: IntArray)";
String expectedAnnotation = "AnnIntArray(a = {IntegerValueType(1), IntegerValueType(2)})";
doTest(content, expectedAnnotation);
}
public void testIntArrayVarargAnnotation() throws IOException {
String content = getContent("AnnIntVararg(1, 2)");
String expectedAnnotation = "AnnIntVararg(a = {IntegerValueType(1), IntegerValueType(2)}: IntArray)";
String expectedAnnotation = "AnnIntVararg(a = {IntegerValueType(1), IntegerValueType(2)})";
doTest(content, expectedAnnotation);
}
public void testStringArrayVarargAnnotation() throws IOException {
String content = getContent("AnnStringVararg(\"a\", \"b\")");
String expectedAnnotation = "AnnStringVararg(a = {\"a\", \"b\"}: Array<out String>)";
String expectedAnnotation = "AnnStringVararg(a = {\"a\", \"b\"})";
doTest(content, expectedAnnotation);
}
public void testStringArrayAnnotation() throws IOException {
String content = getContent("AnnStringArray(array(\"a\"))");
String expectedAnnotation = "AnnStringArray(a = {\"a\"}: Array<String>)";
String expectedAnnotation = "AnnStringArray(a = {\"a\"})";
doTest(content, expectedAnnotation);
}
public void testEnumArrayAnnotation() throws IOException {
String content = getContent("AnnArrayOfEnum(array(MyEnum.A))");
String expectedAnnotation = "AnnArrayOfEnum(a = {MyEnum.A}: Array<MyEnum>)";
String expectedAnnotation = "AnnArrayOfEnum(a = {MyEnum.A})";
doTest(content, expectedAnnotation);
}
public void testAnnotationAnnotation() throws Exception {
String content = getContent("AnnAnn(AnnInt(1))");
String expectedAnnotation = "AnnAnn(a = AnnInt(a = IntegerValueType(1): IntegerValueType(1)): AnnInt)";
String expectedAnnotation = "AnnAnn(a = AnnInt(a = IntegerValueType(1)))";
doTest(content, expectedAnnotation);
}
public void testJavaClassAnnotation() throws Exception {
String content = getContent("AnnClass(MyClass::class)");
String expectedAnnotation = "AnnClass(a = MyClass::class: KClass<MyClass>)";
String expectedAnnotation = "AnnClass(a = MyClass::class)";
doTest(content, expectedAnnotation);
}
}
@@ -92,4 +92,8 @@ public class BuiltInsSerializerTest : TestCaseWithTmpdir() {
fun testEnum() {
doTest("annotationArguments/enum.kt")
}
fun testVarArgs() {
doTest("annotationArguments/varargs.kt")
}
}