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
+1 -1
View File
@@ -39,7 +39,7 @@ abstract class Tag(val name: String) : Element() {
private fun renderAttributes(): String? {
val builder = StringBuilder()
for (a in attributes.keySet()) {
for (a in attributes.keys) {
builder.append(" $a=\"${attributes[a]}\"")
}
return builder.toString()
@@ -39,7 +39,7 @@ abstract class Tag(val name: String) : Element() {
private fun renderAttributes(): String? {
val builder = StringBuilder()
for (a in attributes.keySet()) {
for (a in attributes.keys) {
builder.append(" $a=\"${attributes[a]}\"")
}
return builder.toString()
@@ -1,6 +1,6 @@
fun test1(): Int {
val inlineX = Inline()
return inlineX.foo({ z: Int -> "" + z}, 25, fun String.(): Int = this.length())
return inlineX.foo({ z: Int -> "" + z}, 25, fun String.(): Int = this.length)
}
fun box(): String {
@@ -3,7 +3,7 @@ package test
public class Holder(var value: String = "") {
operator fun plusAssign(s: String?) {
if (value.length() != 0) {
if (value.length != 0) {
value += " -> "
}
value += s
@@ -3,7 +3,7 @@ package test
public class Holder(var value: String = "") {
operator fun plusAssign(s: String?) {
if (value.length() != 0) {
if (value.length != 0) {
value += " -> "
}
value += s
@@ -29,7 +29,7 @@ class Test() : MCloseable {
throw MyException("exception")
}
catch (e: MyException) {
status += e.getMessage()
status += e.message
return status
}
finally {
@@ -32,8 +32,8 @@ fun test0(h: Holder): String {
return localResult;
}
catch (e: RuntimeException) {
if (e.getMessage() != "FINALLY") {
return "FAIL in exception: " + e.getMessage()
if (e.message != "FINALLY") {
return "FAIL in exception: " + e.message
}
else {
return "CATCHED_EXCEPTION"
@@ -56,9 +56,9 @@ fun test0(
}, res)
return localResult;
} catch(e: Exception1) {
return e.getMessage()!!
return e.message!!
} catch(e: Exception2) {
return e.getMessage()!!
return e.message!!
}
}
@@ -28,9 +28,9 @@ fun test0(
}, res)
return localResult;
} catch(e: Exception1) {
return e.getMessage()!!
return e.message!!
} catch(e: Exception2) {
return e.getMessage()!!
return e.message!!
}
}
@@ -76,8 +76,8 @@ fun test5(h: Holder): String {
return localResult;
} catch (e: RuntimeException) {
if (e.getMessage() != "EXCEPTION") {
return "FAIL in exception: " + e.getMessage()
if (e.message != "EXCEPTION") {
return "FAIL in exception: " + e.message
} else {
return "CATCHED_EXCEPTION"
}
@@ -28,8 +28,8 @@ fun test0(h: Holder): String {
return localResult;
}
catch (e: RuntimeException) {
if (e.getMessage() != "FINALLY") {
return "FAIL in exception: " + e.getMessage()
if (e.message != "FINALLY") {
return "FAIL in exception: " + e.message
}
else {
return "CATCHED_EXCEPTION"
@@ -108,8 +108,8 @@ fun test1(h: Holder): String {
}, "Fail")
}
catch (e: RuntimeException) {
if (e.getMessage() != "FINALLY") {
return "FAIL in exception: " + e.getMessage()
if (e.message != "FINALLY") {
return "FAIL in exception: " + e.message
}
else {
return "CATCHED_EXCEPTION"
@@ -172,8 +172,8 @@ fun test3(h: Holder): String {
}, "Fail")
}
catch (e: RuntimeException) {
if (e.getMessage() != "FINALLY") {
return "FAIL in exception: " + e.getMessage()
if (e.message != "FINALLY") {
return "FAIL in exception: " + e.message
}
else {
return "CATCHED_EXCEPTION"
@@ -23,8 +23,8 @@ fun test0(h: Holder): String {
return localResult;
} catch (e: RuntimeException) {
if (e.getMessage() != "FINALLY") {
return "FAIL in exception: " + e.getMessage()
if (e.message != "FINALLY") {
return "FAIL in exception: " + e.message
} else {
return "CATCHED_EXCEPTION"
}
@@ -51,8 +51,8 @@ fun test1(h: Holder): String {
"OK_FINALLY"
})
} catch (e: RuntimeException) {
if (e.getMessage() != "FINALLY") {
return "FAIL in exception: " + e.getMessage()
if (e.message != "FINALLY") {
return "FAIL in exception: " + e.message
} else {
return "CATCHED_EXCEPTION"
}
@@ -100,8 +100,8 @@ fun test3(h: Holder): String {
"OK_FINALLY"
})
} catch (e: RuntimeException) {
if (e.getMessage() != "FINALLY") {
return "FAIL in exception: " + e.getMessage()
if (e.message != "FINALLY") {
return "FAIL in exception: " + e.message
} else {
return "CATCHED_EXCEPTION"
}
@@ -128,8 +128,8 @@ fun test4(h: Holder): String {
"OK_FINALLY"
})
} catch (e: RuntimeException) {
if (e.getMessage() != "EXCEPTION") {
return "FAIL in exception: " + e.getMessage()
if (e.message != "EXCEPTION") {
return "FAIL in exception: " + e.message
} else {
return "CATCHED_EXCEPTION"
}
@@ -30,9 +30,9 @@ fun test0(
res)
return localResult;
} catch(e: Exception1) {
return e.getMessage()!!
return e.message!!
} catch(e: Exception2) {
return e.getMessage()!!
return e.message!!
}
}
@@ -3,7 +3,7 @@ package test
public class Holder(var value: String = "") {
operator fun plusAssign(s: String?) {
if (value.length() != 0) {
if (value.length != 0) {
value += " -> "
}
value += s
@@ -4,7 +4,7 @@ inline fun <T> bar(arg: String, action: () -> T) {
try {
action()
} finally {
arg.length()
arg.length
}
}
@@ -20,7 +20,7 @@ public class ClassA {
result = name + name2
val length = name.length()
val length = name.length
}
}
}
+1 -1
View File
@@ -4,7 +4,7 @@ package test
public inline fun <reified T: Any> Any.inlineMeIfYouCan() : () -> Runnable = {
object : Runnable {
override fun run() {
javaClass<T>().newInstance()
T::class.java.newInstance()
}
}
}
+1 -1
View File
@@ -5,6 +5,6 @@ enum class MyEnum {
//TODO: KT-4693
inline fun <T> doSmth(a: T) : String {
return a.toString() + K.name()
return a.toString() + K.name
}
}
@@ -40,7 +40,7 @@ fun test2() : Int {
}
return result
} catch (e: RuntimeException) {
return e.getMessage()!!.toInt2()!!
return e.message!!.toInt2()!!
}
}
@@ -18,7 +18,7 @@ fun test11(): Int {
}
},
{ ex, thizz ->
if (ex.getMessage() == "2") {
if (ex.message == "2") {
thizz.value
} else {
-11111
@@ -66,7 +66,7 @@ fun test3(): Int {
})
return res
} catch (e: RuntimeException) {
return e.getMessage()?.toInt2()!!
return e.message?.toInt2()!!
}
}
@@ -81,7 +81,7 @@ fun test33(): Int {
}
},
{ ex, thizz ->
if (ex.getMessage() == "-2") {
if (ex.message == "-2") {
throw RuntimeException("-3")
} else {
-11111
@@ -89,7 +89,7 @@ fun test33(): Int {
})
return res
} catch (e: RuntimeException) {
return e.getMessage()!!.toInt2()!!
return e.message!!.toInt2()!!
}
}
@@ -57,7 +57,7 @@ fun test3(): Int {
})
return res
} catch (e: RuntimeException) {
return e.getMessage()?.toInt()!!
return e.message?.toInt()!!
}
}