Extract Function: Add test data

This commit is contained in:
Alexey Sedunov
2014-04-10 20:09:13 +04:00
parent 4dec0508a6
commit 0d90dcf010
111 changed files with 1596 additions and 13 deletions
@@ -0,0 +1,5 @@
// NEXT_SIBLING:
fun foo(a: Int): Int {
val b: Int = 1
return <selection>if (a + b > 0) 1 else if (a - b < 0) 2 else b </selection>
}
@@ -0,0 +1,9 @@
// NEXT_SIBLING:
fun i(a: Int, b: Int): Int {
return if (a + b > 0) 1 else if (a - b < 0) 2 else b
}
fun foo(a: Int): Int {
val b: Int = 1
return i(a, b)
}
@@ -0,0 +1,9 @@
// NEXT_SIBLING:
fun foo(a: Int): Int {
val b: Int = 1
return <selection>when (a + b) {
0 -> b
1 -> -b
else -> a - b
}</selection>
}
@@ -0,0 +1,13 @@
// NEXT_SIBLING:
fun i(a: Int, b: Int): Int {
return when (a + b) {
0 -> b
1 -> -b
else -> a - b
}
}
fun foo(a: Int): Int {
val b: Int = 1
return i(a, b)
}
@@ -0,0 +1,5 @@
// NEXT_SIBLING:
fun foo(a: Int): Int {
val b: Int = 1
return <selection>a + b</selection>
}
@@ -0,0 +1,9 @@
// NEXT_SIBLING:
fun i(a: Int, b: Int): Int {
return a + b
}
fun foo(a: Int): Int {
val b: Int = 1
return i(a, b)
}