Migrate testdata to new lambda syntax

This commit is contained in:
Stanislav Erokhin
2015-04-03 13:40:07 +03:00
parent b703f59e04
commit 3de0dff575
134 changed files with 263 additions and 277 deletions
@@ -7,7 +7,7 @@ package foo
fun test1(): Int {
val inlineX = Inline()
return inlineX.foo({(z: Int) -> "" + z}, 25, {String.() -> this.length})
return inlineX.foo({ z: Int -> "" + z}, 25, {String.() -> this.length})
}
fun box(): String {
@@ -8,7 +8,7 @@ package foo
fun testAll(): String {
val inlineX = InlineAll()
return inlineX.inline({(a1: Int, a2: Double, a3: Double, a4: String, a5: Long) ->
return inlineX.inline({ a1: Int, a2: Double, a3: Double, a4: String, a5: Long ->
"" + a1 + a2 + a3 + a4 + a5},
1, 12.5, 13.5, "14", 15)
}
@@ -26,7 +26,7 @@ fun testAllWithCapturedVal(): String {
val c8 = 27
val c9 = 28.5
return inlineX.inline({(a1: Int, a2: Double, a3: Double, a4: String, a5: Long) ->
return inlineX.inline({ a1: Int, a2: Double, a3: Double, a4: String, a5: Long ->
"" + a1 + a2 + a3 + a4 + a5 + c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8 + c9},
1, 12.5, 13.5, "14", 15)
}
@@ -44,7 +44,7 @@ fun testAllWithCapturedVar(): String {
var c8 = 27
val c9 = 28.5
return inlineX.inline({(a1: Int, a2: Double, a3: Double, a4: String, a5: Long) ->
return inlineX.inline({ a1: Int, a2: Double, a3: Double, a4: String, a5: Long ->
"" + a1 + a2 + a3 + a4 + a5 + c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8 + c9},
1, 12.5, 13.5, "14", 15)
}
@@ -62,7 +62,7 @@ fun testAllWithCapturedValAndVar(): String {
var c8 = 27
val c9 = 28.5
return inlineX.inline({(a1: Int, a2: Double, a3: Double, a4: String, a5: Long) ->
return inlineX.inline({ a1: Int, a2: Double, a3: Double, a4: String, a5: Long ->
"" + a1 + a2 + a3 + a4 + a5 + c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8 + c9},
1, 12.5, 13.5, "14", 15)
}
@@ -6,7 +6,7 @@
package foo
fun testAll(): String {
return inline({(a1: Int, a2: Double, a3: Double, a4: String, a5: Long) ->
return inline({ a1: Int, a2: Double, a3: Double, a4: String, a5: Long ->
"" + a1 + a2 + a3 + a4 + a5},
1, 12.5, 13.5, "14", 15)
}
@@ -22,7 +22,7 @@ fun testAllWithCapturedVal(): String {
val c8 = 27
val c9 = 28.5
return inline({(a1: Int, a2: Double, a3: Double, a4: String, a5: Long) ->
return inline({ a1: Int, a2: Double, a3: Double, a4: String, a5: Long ->
"" + a1 + a2 + a3 + a4 + a5 + c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8 + c9},
1, 12.5, 13.5, "14", 15)
}
@@ -38,7 +38,7 @@ fun testAllWithCapturedVar(): String {
var c8 = 27
val c9 = 28.5
return inline({(a1: Int, a2: Double, a3: Double, a4: String, a5: Long) ->
return inline({ a1: Int, a2: Double, a3: Double, a4: String, a5: Long ->
"" + a1 + a2 + a3 + a4 + a5 + c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8 + c9},
1, 12.5, 13.5, "14", 15)
}
@@ -54,7 +54,7 @@ fun testAllWithCapturedValAndVar(): String {
var c8 = 27
val c9 = 28.5
return inline({(a1: Int, a2: Double, a3: Double, a4: String, a5: Long) ->
return inline({ a1: Int, a2: Double, a3: Double, a4: String, a5: Long ->
"" + a1 + a2 + a3 + a4 + a5 + c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8 + c9},
1, 12.5, 13.5, "14", 15)
}
@@ -24,7 +24,7 @@ fun test11(): Int {
throw RuntimeExceptionWithValue("2")
}
},
{(ex, thizz) ->
{ ex, thizz ->
if (ex.value == "2") {
thizz.value
} else {
@@ -55,7 +55,7 @@ fun test22(): Int {
111
}
},
{(ex, thizz) ->
{ ex, thizz ->
-11111
})
@@ -87,7 +87,7 @@ fun test33(): Int {
throw RuntimeExceptionWithValue("-2")
}
},
{(ex, thizz) ->
{ ex, thizz ->
if (ex.value == "-2") {
throw RuntimeExceptionWithValue("-3")
} else {
@@ -55,7 +55,7 @@ fun test3(): Int {
result = it.value;
throw RuntimeException("-1")
},
{ (e, z)->
{ e, z ->
++result
throw RuntimeException("-2")
},