class_mult avoided
This commit is contained in:
@@ -46,8 +46,7 @@ public class JavaToKotlinConverterTest extends LightDaemonAnalyzerTestCase {
|
|||||||
else if (javaFile.getParent().endsWith("/method")) actual = methodToSingleLineKotlin(javaCode);
|
else if (javaFile.getParent().endsWith("/method")) actual = methodToSingleLineKotlin(javaCode);
|
||||||
else if (javaFile.getParent().endsWith("/method_mult")) actual = methodToKotlin(javaCode);
|
else if (javaFile.getParent().endsWith("/method_mult")) actual = methodToKotlin(javaCode);
|
||||||
|
|
||||||
else if (javaFile.getParent().endsWith("/class")) actual = classToSingleLineKotlin(javaCode);
|
else if (javaFile.getParent().endsWith("/class")) actual = classToKotlin(javaCode);
|
||||||
else if (javaFile.getParent().endsWith("/class_mult")) actual = classToKotlin(javaCode);
|
|
||||||
|
|
||||||
else if (javaFile.getParent().endsWith("/file")) actual = fileToKotlin(javaCode);
|
else if (javaFile.getParent().endsWith("/file")) actual = fileToKotlin(javaCode);
|
||||||
|
|
||||||
@@ -112,11 +111,15 @@ public class JavaToKotlinConverterTest extends LightDaemonAnalyzerTestCase {
|
|||||||
return prettify(result);
|
return prettify(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
protected String methodToSingleLineKotlin(String text) throws IOException {
|
||||||
protected String classToSingleLineKotlin(String text) throws IOException {
|
return toSingleLine(methodToKotlin(text));
|
||||||
return toSingleLine(classToKotlin(text));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected String statementToSingleLineKotlin(String code) throws Exception {
|
||||||
|
return toSingleLine(statementToKotlin(code));
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
protected String methodToKotlin(String text) throws IOException {
|
protected String methodToKotlin(String text) throws IOException {
|
||||||
String result = classToKotlin("final class C {" + text + "}")
|
String result = classToKotlin("final class C {" + text + "}")
|
||||||
.replaceAll("class C \\{", "");
|
.replaceAll("class C \\{", "");
|
||||||
@@ -124,10 +127,7 @@ public class JavaToKotlinConverterTest extends LightDaemonAnalyzerTestCase {
|
|||||||
return prettify(result);
|
return prettify(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String methodToSingleLineKotlin(String text) throws IOException {
|
@NotNull
|
||||||
return toSingleLine(methodToKotlin(text));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected String statementToKotlin(String text) throws Exception {
|
protected String statementToKotlin(String text) throws Exception {
|
||||||
String result = methodToKotlin("void main() {" + text + "}");
|
String result = methodToKotlin("void main() {" + text + "}");
|
||||||
int pos = result.lastIndexOf("}");
|
int pos = result.lastIndexOf("}");
|
||||||
@@ -135,10 +135,7 @@ public class JavaToKotlinConverterTest extends LightDaemonAnalyzerTestCase {
|
|||||||
return prettify(result);
|
return prettify(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String statementToSingleLineKotlin(String code) throws Exception {
|
@NotNull
|
||||||
return toSingleLine(statementToKotlin(code));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected String expressionToKotlin(String code) throws Exception {
|
protected String expressionToKotlin(String code) throws Exception {
|
||||||
String result = statementToKotlin("Object o =" + code + "}");
|
String result = statementToKotlin("Object o =" + code + "}");
|
||||||
result = result.replaceFirst("var o : Any\\? =", "");
|
result = result.replaceFirst("var o : Any\\? =", "");
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
open class Test { }
|
open class Test {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
class A { }
|
class A {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
class A : Base, I { }
|
class A : Base, I {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
class A : Base, I0, I1, I2 { }
|
class A : Base, I0, I1, I2 {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
class Test { }
|
class Test {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
class Entry<K, V> { }
|
class Entry<K, V> {
|
||||||
|
}
|
||||||
@@ -1 +1,4 @@
|
|||||||
class A { class B { } }
|
class A {
|
||||||
|
class B {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1 +1,6 @@
|
|||||||
class S { class object { open class Inner { } } }
|
class S {
|
||||||
|
class object {
|
||||||
|
open class Inner {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
open class Test { }
|
open class Test {
|
||||||
|
}
|
||||||
@@ -1 +1,8 @@
|
|||||||
class S { class object { var myI : Int = 10 } fun sB() : Boolean { return true } }
|
class S {
|
||||||
|
class object {
|
||||||
|
var myI : Int = 10
|
||||||
|
}
|
||||||
|
fun sB() : Boolean {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1 +1,7 @@
|
|||||||
class S { class object { fun staticF() : Boolean { return true } } }
|
class S {
|
||||||
|
class object {
|
||||||
|
fun staticF() : Boolean {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1 +1,10 @@
|
|||||||
class S { class object { fun sI() : Int { return 1 } } fun sB() : Boolean { return true } }
|
class S {
|
||||||
|
class object {
|
||||||
|
fun sI() : Int {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fun sB() : Boolean {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
private open class Test { }
|
private open class Test {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
protected open class Test { }
|
protected open class Test {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
public open class Test { }
|
public open class Test {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
class A : Base { }
|
class A : Base {
|
||||||
|
}
|
||||||
@@ -1 +1,10 @@
|
|||||||
class S { class object { fun sB() : Boolean { return true } fun sI() : Int { return 1 } } }
|
class S {
|
||||||
|
class object {
|
||||||
|
fun sB() : Boolean {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
fun sI() : Int {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
enum A { }
|
enum A {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
enum A : I { }
|
enum A : I {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
enum A : I0, I1, I2 { }
|
enum A : I0, I1, I2 {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
enum Test { }
|
enum Test {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
private enum Test { }
|
private enum Test {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
protected enum Test { }
|
protected enum Test {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
public enum Test { }
|
public enum Test {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
trait A { }
|
trait A {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
trait A : I0, I1, I2 { }
|
trait A : I0, I1, I2 {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
trait A : I { }
|
trait A : I {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
trait Test { }
|
trait Test {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
private trait Test { }
|
private trait Test {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
protected trait Test { }
|
protected trait Test {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
public trait Test { }
|
public trait Test {
|
||||||
|
}
|
||||||
+2
-1
@@ -1 +1,2 @@
|
|||||||
class CC<T : INode?, K : Node?> : A where T : Comparable<in T?>?, K : Collection<in K?>? { }
|
class CC<T : INode?, K : Node?> : A where T : Comparable<in T?>?, K : Collection<in K?>? {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
class C<T : INode?> where T : Comparable<in T?>? { }
|
class C<T : INode?> where T : Comparable<in T?>? {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
class C<T : INode?> : A where T : Comparable<in T?>? { }
|
class C<T : INode?> : A where T : Comparable<in T?>? {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
trait CommandHandler<T : Command?> { }
|
trait CommandHandler<T : Command?> {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
trait CommandHandler<T : INode?, String> { }
|
trait CommandHandler<T : INode?, String> {
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
class Comparable<T> { }
|
class Comparable<T> {
|
||||||
|
}
|
||||||
+2
-1
@@ -1 +1,2 @@
|
|||||||
trait I<T : INode?, K : Node?> : II where T : Comparable<in T?>?, K : Collection<in K?>? { }
|
trait I<T : INode?, K : Node?> : II where T : Comparable<in T?>?, K : Collection<in K?>? {
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user