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,26 +0,0 @@
package test
public class Test(str: String) {
var myStr: String = "String2"
public fun sout(str: String) {
System.out.println(str)
}
public fun dummy(str: String): String {
return str
}
public fun test() {
sout("String")
val test = "String2"
sout(test)
sout(dummy(test))
Test(test)
}
{
myStr = str
}
}
@@ -1,4 +1,6 @@
//file
// !forceNotNullTypes: false
// !specifyLocalVariableTypeByDefault: true
package test;
import org.jetbrains.annotations.NotNull;
@@ -1,19 +1,21 @@
// !forceNotNullTypes: false
// !specifyLocalVariableTypeByDefault: true
package test
public open class Test(str: String) {
public class Test(str: String) {
var myStr: String = "String2"
public open fun sout(str: String) {
public fun sout(str: String) {
System.out?.println(str)
}
public open fun dummy(str: String): String {
public fun dummy(str: String): String {
return str
}
public open fun test() {
public fun test() {
sout("String")
var test: String = "String2"
val test: String = "String2"
sout(test)
sout(dummy(test))
@@ -1,20 +0,0 @@
package test
class Foo() {
fun execute() {
}
}
class Bar() {
var fooNotNull: Foo = Foo()
var fooNullable: Foo = null
}
class Test() {
public fun test(barNotNull: Bar, barNullable: Bar) {
barNotNull.fooNotNull.execute()
barNotNull.fooNullable.execute()
barNullable.fooNotNull.execute()
barNullable.fooNullable.execute()
}
}
@@ -1,4 +1,6 @@
//file
// !forceNotNullTypes: false
// !specifyLocalVariableTypeByDefault: true
package test;
import org.jetbrains.annotations.NotNull;
@@ -1,17 +1,19 @@
// !forceNotNullTypes: false
// !specifyLocalVariableTypeByDefault: true
package test
open class Foo() {
open fun execute() {
class Foo() {
fun execute() {
}
}
open class Bar() {
class Bar() {
var fooNotNull: Foo = Foo()
var fooNullable: Foo? = null
}
open class Test() {
public open fun test(barNotNull: Bar, barNullable: Bar?) {
class Test() {
public fun test(barNotNull: Bar, barNullable: Bar?) {
barNotNull.fooNotNull.execute()
barNotNull.fooNullable?.execute()
barNullable?.fooNotNull?.execute()