Fix deprecations in testData
This commit is contained in:
@@ -32,7 +32,7 @@ val fns = arrayOf<Any>(::fn0, ::fn1, ::fn2, ::fn3, ::fn4, ::fn5, ::fn6, ::fn7, :
|
||||
::fn20, ::fn21, ::fn22)
|
||||
|
||||
inline fun asFailsWithCCE(operation: String, crossinline block: () -> Unit) {
|
||||
assertFailsWith(ClassCastException::class.java, "$operation should throw an exception") {
|
||||
assertFailsWith(ClassCastException::class, "$operation should throw an exception") {
|
||||
block()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ inline fun <reified T> reifiedAsSucceeds(x: Any, operation: String) {
|
||||
}
|
||||
|
||||
inline fun <reified T> reifiedAsFailsWithCCE(x: Any, operation: String) {
|
||||
assertFailsWith(ClassCastException::class.java, "$operation should throw an exception") {
|
||||
assertFailsWith(ClassCastException::class, "$operation should throw an exception") {
|
||||
x as T
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user