Java to Kotlin converter: no more 2 conversion modes for each test, just a few tests to test non-standard settings

This commit is contained in:
Valentin Kipyatkov
2014-06-03 22:12:45 +04:00
parent 57d118e13d
commit 6b11a5b3d9
597 changed files with 936 additions and 5558 deletions
@@ -1,14 +0,0 @@
import java.util.*
public class ForEach() {
public fun test() {
val xs = ArrayList<Any>()
val ys = LinkedList<Any>()
for (x in xs) {
ys.add(x)
}
for (y in ys) {
xs.add(y)
}
}
}
+8 -8
View File
@@ -1,14 +1,14 @@
import java.util.*
public open class ForEach() {
public open fun test() {
var xs: ArrayList<Any?>? = ArrayList<Any?>()
var ys: MutableList<Any?>? = LinkedList<Any?>()
for (x in xs!!) {
ys?.add(x)
public class ForEach() {
public fun test() {
val xs = ArrayList<Any>()
val ys = LinkedList<Any>()
for (x in xs) {
ys.add(x)
}
for (y in ys!!) {
xs?.add(y)
for (y in ys) {
xs.add(y)
}
}
}
-14
View File
@@ -1,14 +0,0 @@
import java.util.*
public class Lists() {
public fun test() {
val xs = ArrayList<Any>()
val ys = LinkedList<Any>()
val zs = ArrayList<Any>()
xs.add(null)
ys.add(null)
xs.clear()
ys.clear()
zs.add(null)
}
}
+10 -10
View File
@@ -1,14 +1,14 @@
import java.util.*
public open class Lists() {
public open fun test() {
var xs: MutableList<Any?>? = ArrayList<Any?>()
var ys: MutableList<Any?>? = LinkedList<Any?>()
var zs: ArrayList<Any?>? = ArrayList<Any?>()
xs?.add(null)
ys?.add(null)
xs?.clear()
ys?.clear()
zs?.add(null)
public class Lists() {
public fun test() {
val xs = ArrayList<Any>()
val ys = LinkedList<Any>()
val zs = ArrayList<Any>()
xs.add(null)
ys.add(null)
xs.clear()
ys.clear()
zs.add(null)
}
}