Fix deprecations in testData: arrayOf usages.

This commit is contained in:
Ilya Gorbunov
2015-09-11 17:31:06 +03:00
parent ae7cc8e430
commit e40a5457e3
36 changed files with 88 additions and 88 deletions
@@ -319,7 +319,7 @@ public class AnnotationGenTest extends CodegenTestCase {
"" +
"@java.lang.annotation.Retention(RetentionPolicy.RUNTIME) annotation class A(val a: Array<String>)\n" +
"" +
"@A(array(\"239\",\"932\")) class B()");
"@A(arrayOf(\"239\",\"932\")) class B()");
Class aClass = generateClass("A");
Retention annotation = (Retention)aClass.getAnnotation(Retention.class);
@@ -354,7 +354,7 @@ public class AnnotationGenTest extends CodegenTestCase {
"" +
"@java.lang.annotation.Retention(RetentionPolicy.RUNTIME) annotation class A(val a: IntArray)\n" +
"" +
"@A(intArray(239,932)) class B()");
"@A(intArrayOf(239,932)) class B()");
Class aClass = generateClass("A");
Retention annotation = (Retention)aClass.getAnnotation(Retention.class);
@@ -411,7 +411,7 @@ public class AnnotationGenTest extends CodegenTestCase {
"" +
"@Retention(RetentionPolicy.RUNTIME) annotation class A(val a: Array<Retention>)\n" +
"" +
"@A(array(Retention(RetentionPolicy.RUNTIME),Retention(RetentionPolicy.SOURCE))) class B()");
"@A(arrayOf(Retention(RetentionPolicy.RUNTIME),Retention(RetentionPolicy.SOURCE))) class B()");
Class aClass = generateClass("A");
Method[] methods = aClass.getDeclaredMethods();
@@ -50,7 +50,7 @@ public class AnnotationDescriptorResolveTest extends AbstractAnnotationDescripto
}
public void testIntArrayAnnotation() throws IOException {
String content = getContent("AnnIntArray(intArray(1, 2))");
String content = getContent("AnnIntArray(intArrayOf(1, 2))");
String expectedAnnotation = "@AnnIntArray(a = {1, 2})";
doTest(content, expectedAnnotation);
}
@@ -68,13 +68,13 @@ public class AnnotationDescriptorResolveTest extends AbstractAnnotationDescripto
}
public void testStringArrayAnnotation() throws IOException {
String content = getContent("AnnStringArray(array(\"a\"))");
String content = getContent("AnnStringArray(arrayOf(\"a\"))");
String expectedAnnotation = "@AnnStringArray(a = {\"a\"})";
doTest(content, expectedAnnotation);
}
public void testEnumArrayAnnotation() throws IOException {
String content = getContent("AnnArrayOfEnum(array(MyEnum.A))");
String content = getContent("AnnArrayOfEnum(arrayOf(MyEnum.A))");
String expectedAnnotation = "@AnnArrayOfEnum(a = {MyEnum.A})";
doTest(content, expectedAnnotation);
}