Support varargs in annotation arguments

This commit is contained in:
Natalia.Ukhorskaya
2013-07-05 18:15:54 +04:00
parent 42f10d77db
commit 42b0bdc54d
3 changed files with 51 additions and 19 deletions
@@ -89,6 +89,18 @@ public class AnnotationDescriptorResolveTest extends JetLiteFixture {
doTest(content, expectedAnnotation);
}
public void testIntArrayVarargAnnotation() throws IOException {
String content = getContent("AnnIntVararg(1, 2)");
String expectedAnnotation = "AnnIntVararg[a = [1.toInt(), 2.toInt()]: jet.IntArray]";
doTest(content, expectedAnnotation);
}
public void testStringArrayVarargAnnotation() throws IOException {
String content = getContent("AnnStringVararg(\"a\", \"b\")");
String expectedAnnotation = "AnnStringVararg[a = [\"a\", \"b\"]: jet.Array<jet.String>]";
doTest(content, expectedAnnotation);
}
public void testStringArrayAnnotation() throws IOException {
String content = getContent("AnnStringArray(array(\"a\"))");
String expectedAnnotation = "AnnStringArray[a = [\"a\"]: jet.Array<jet.String>]";