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
@@ -118,7 +118,7 @@ fun box(): String {
asSucceeds("mentry as MutableMap.MutableEntry") { mentry as MutableMap.MutableEntry<*, *> }
hashMap[""] = ""
val hashMapEntry = hashMap.entrySet().first()
val hashMapEntry = hashMap.entries.first()
asSucceeds("hashMapEntry as MutableMap.MutableEntry") { hashMapEntry as MutableMap.MutableEntry<*, *> }
@@ -96,7 +96,7 @@ fun box(): String {
val mentry = MME()
hashMap[""] = ""
val hashMapEntry = hashMap.entrySet().first()
val hashMapEntry = hashMap.entries.first()
assert(entry !is MutableMap.MutableEntry<*, *>) { "ME should satisfy '!is MutableMap.MutableEntry'"}
assert(mentry is MutableMap.MutableEntry<*, *>) { "MME should satisfy 'is MutableMap.MutableEntry'"}
@@ -118,7 +118,7 @@ fun box(): String {
val mentry = MME()
hashMap[""] = ""
val hashMapEntry = hashMap.entrySet().first()
val hashMapEntry = hashMap.entries.first()
reifiedAsFailsWithCCE<MutableMap.MutableEntry<*, *>>(entry, "reifiedAs<MutableMap.MutableEntry<*, *>>(entry)")
reifiedAsSucceeds<MutableMap.MutableEntry<*, *>>(mentry, "reifiedAs<MutableMap.MutableEntry<*, *>>(mentry)")
@@ -99,7 +99,7 @@ fun box(): String {
val mentry = MME()
hashMap[""] = ""
val hashMapEntry = hashMap.entrySet().first()
val hashMapEntry = hashMap.entries.first()
assert(reifiedIsNot<MutableMap.MutableEntry<*, *>>(entry)) { "reifiedIsNot<MutableMap.MutableEntry<*, *>>(entry)"}
assert(reifiedIs<MutableMap.MutableEntry<*, *>>(mentry)) { "reifiedIs<MutableMap.MutableEntry<*, *>>(mentry)"}
@@ -120,7 +120,7 @@ fun box(): String {
val mentry = MME()
hashMap[""] = ""
val hashMapEntry = hashMap.entrySet().first()
val hashMapEntry = hashMap.entries.first()
reifiedSafeAsReturnsNull<MutableMap.MutableEntry<*, *>>(entry, "reifiedSafeAs<MutableMap.MutableEntry<*, *>>(entry)")
reifiedSafeAsReturnsNonNull<MutableMap.MutableEntry<*, *>>(mentry, "reifiedSafeAs<MutableMap.MutableEntry<*, *>>(mentry)")
@@ -117,7 +117,7 @@ fun box(): String {
safeAsReturnsNonNull("mentry as? MutableMap.MutableEntry") { mentry as? MutableMap.MutableEntry<*, *> }
hashMap[""] = ""
val hashMapEntry = hashMap.entrySet().first()
val hashMapEntry = hashMap.entries.first()
safeAsReturnsNonNull("hashMapEntry as? MutableMap.MutableEntry") { hashMapEntry as? MutableMap.MutableEntry<*, *> }
+1 -1
View File
@@ -8,7 +8,7 @@ fun box(): String {
return "OK"
}
catch (e: Throwable) {
return "Fail: ClassCastException should have been thrown, but was instead ${e.javaClass.getName()}: ${e.getMessage()}"
return "Fail: ClassCastException should have been thrown, but was instead ${e.javaClass.getName()}: ${e.message}"
}
return "Fail: no exception was thrown"