Cleanup deprecated symbol usages in testData

This commit is contained in:
Ilya Gorbunov
2016-01-16 20:10:40 +03:00
parent eefbd72a64
commit 25c4453dc5
403 changed files with 933 additions and 921 deletions
@@ -12,14 +12,14 @@ annotation class Ann(
)
fun box(): String {
val ann = javaClass<MyClass>().getAnnotation(javaClass<Ann>())
val ann = MyClass::class.java.getAnnotation(Ann::class.java)
if (ann == null) return "fail: cannot find Ann on MyClass}"
if (ann.i != 1) return "fail: annotation parameter i should be 1, but was ${ann.i}"
if (ann.s != "a") return "fail: annotation parameter s should be \"a\", but was ${ann.s}"
val annSimpleName = ann.a.annotationType().getSimpleName()
val annSimpleName = ann.a.annotationClass.java.getSimpleName()
if (annSimpleName != "Ann2") return "fail: annotation parameter a should be of class Ann2, but was $annSimpleName"
if (ann.e != MyEnum.A) return "fail: annotation parameter e should be MyEnum.A, but was ${ann.e}"
if (ann.c.java != javaClass<A>()) return "fail: annotation parameter c should be of class A, but was ${ann.c}"
if (ann.c.java != A::class.java) return "fail: annotation parameter c should be of class A, but was ${ann.c}"
if (ann.ia[0] != 1 || ann.ia[1] != 2) return "fail: annotation parameter ia should be [1, 2], but was ${ann.ia}"
if (ann.sa[0] != "a" || ann.sa[1] != "b") return "fail: annotation parameter ia should be [\"a\", \"b\"], but was ${ann.sa}"
return "OK"