mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] J2K: cleanup testdata
Remove unnecessary errors. GitOrigin-RevId: 30a0f7a00344bac233e438baf4b74d275d5cfde8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d5da599420
commit
cd033a6586
-5
@@ -2312,11 +2312,6 @@ public abstract class NewJavaToKotlinConverterSingleFileTestGenerated extends Ab
|
||||
runTest("../../shared/tests/testData/newJ2k/field/varWithInit.java");
|
||||
}
|
||||
|
||||
@TestMetadata("varWithoutInit.java")
|
||||
public void testVarWithoutInit() throws Exception {
|
||||
runTest("../../shared/tests/testData/newJ2k/field/varWithoutInit.java");
|
||||
}
|
||||
|
||||
@TestMetadata("volatileCommon.java")
|
||||
public void testVolatileCommon() throws Exception {
|
||||
runTest("../../shared/tests/testData/newJ2k/field/volatileCommon.java");
|
||||
|
||||
-5
@@ -2312,11 +2312,6 @@ public abstract class K2JavaToKotlinConverterSingleFileTestGenerated extends Abs
|
||||
runTest("../../shared/tests/testData/newJ2k/field/varWithInit.java");
|
||||
}
|
||||
|
||||
@TestMetadata("varWithoutInit.java")
|
||||
public void testVarWithoutInit() throws Exception {
|
||||
runTest("../../shared/tests/testData/newJ2k/field/varWithoutInit.java");
|
||||
}
|
||||
|
||||
@TestMetadata("volatileCommon.java")
|
||||
public void testVolatileCommon() throws Exception {
|
||||
runTest("../../shared/tests/testData/newJ2k/field/volatileCommon.java");
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_K2
|
||||
class C {
|
||||
Foo f;
|
||||
String f;
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
// ERROR: Unresolved reference: Foo
|
||||
internal class C {
|
||||
var f: Foo? = null
|
||||
var f: String? = null
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_K2
|
||||
class C {
|
||||
private Foo f;
|
||||
private String f;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// ERROR: Unresolved reference: Foo
|
||||
internal class C {
|
||||
private val f: Foo? = null
|
||||
private val f: String? = null
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_K2
|
||||
class C {
|
||||
protected Foo f;
|
||||
protected String f;
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
// ERROR: Unresolved reference: Foo
|
||||
internal class C {
|
||||
protected var f: Foo? = null
|
||||
protected var f: String? = null
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_K2
|
||||
class C {
|
||||
public Foo f;
|
||||
public String f;
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
// ERROR: Unresolved reference: Foo
|
||||
internal class C {
|
||||
var f: Foo? = null
|
||||
var f: String? = null
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
// IGNORE_K2
|
||||
class C {
|
||||
Foo f;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// ERROR: Unresolved reference: Foo
|
||||
internal class C {
|
||||
var f: Foo? = null
|
||||
}
|
||||
@@ -1,3 +1,2 @@
|
||||
// IGNORE_K2
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.ArrayBlockingQueues;
|
||||
import java.util.concurrent.BlockingDeque;
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
// ERROR: Unresolved reference: ArrayBlockingQueues
|
||||
import java.util.concurrent.ArrayBlockingQueues
|
||||
|
||||
@@ -4,7 +4,7 @@ import java.util.*;
|
||||
public class ForEach {
|
||||
public void test() {
|
||||
ArrayList<Object> xs = new ArrayList<Object>();
|
||||
List<Object> ys = new ELinkedList<Object>();
|
||||
List<Object> ys = new LinkedList<Object>();
|
||||
for (Object x : xs) {
|
||||
ys.add(x);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
// ERROR: Unresolved reference: ELinkedList
|
||||
import java.util.LinkedList
|
||||
|
||||
class ForEach {
|
||||
fun test() {
|
||||
val xs = ArrayList<Any>()
|
||||
val ys: MutableList<Any> = ELinkedList<Any>()
|
||||
val ys: MutableList<Any> = LinkedList()
|
||||
for (x in xs) {
|
||||
ys.add(x)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import java.util.*;
|
||||
public class Lists {
|
||||
public void test() {
|
||||
List<Object> xs = new ArrayList<Object>();
|
||||
List<Object> ys = new ELinkedList<Object>();
|
||||
List<Object> ys = new LinkedList<Object>();
|
||||
ArrayList<Object> zs = new ArrayList<Object>();
|
||||
xs.add(null);
|
||||
ys.add(null);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
// ERROR: Unresolved reference: ELinkedList
|
||||
import java.util.LinkedList
|
||||
|
||||
class Lists {
|
||||
fun test() {
|
||||
val xs: MutableList<Any?> = ArrayList()
|
||||
val ys: MutableList<Any?> = ELinkedList<Any>()
|
||||
val ys: MutableList<Any?> = LinkedList()
|
||||
val zs = ArrayList<Any?>()
|
||||
xs.add(null)
|
||||
ys.add(null)
|
||||
|
||||
+5
-2
@@ -1,10 +1,13 @@
|
||||
// IGNORE_K2
|
||||
class C {
|
||||
private String s = x();
|
||||
|
||||
private String x() {
|
||||
return null;
|
||||
}
|
||||
|
||||
void foo() {
|
||||
if (s == null) {
|
||||
System.out.print("null");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
-2
@@ -1,6 +1,9 @@
|
||||
// ERROR: Unresolved reference: x
|
||||
internal class C {
|
||||
private val s: String? = x()
|
||||
private val s = x()
|
||||
|
||||
private fun x(): String? {
|
||||
return null
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
if (s == null) {
|
||||
|
||||
+5
-3
@@ -1,8 +1,10 @@
|
||||
// IGNORE_K2
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
class C {
|
||||
@Nullable private final String string = getString();
|
||||
@Nullable
|
||||
final String string = getString();
|
||||
|
||||
static String getString() { return x(); }
|
||||
static String getString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+3
-4
@@ -1,10 +1,9 @@
|
||||
// ERROR: Unresolved reference: x
|
||||
internal class C {
|
||||
private val string: String? = getString()
|
||||
val string: String? = getString()
|
||||
|
||||
companion object {
|
||||
fun getString(): String {
|
||||
return x()
|
||||
fun getString(): String? {
|
||||
return null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,14 @@ import java.io.IOException;
|
||||
class A {
|
||||
void foo() {
|
||||
try {
|
||||
bar()
|
||||
bar();
|
||||
}
|
||||
catch(RuntimeException | IOException e) {
|
||||
e.printStackTrace(); // print stack trace
|
||||
}
|
||||
}
|
||||
|
||||
private void bar() throws IOException {
|
||||
throw new IOException();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
// ERROR: Unresolved reference: bar
|
||||
import java.io.IOException
|
||||
|
||||
internal class A {
|
||||
@@ -11,4 +10,9 @@ internal class A {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
@Throws(IOException::class)
|
||||
private fun bar() {
|
||||
throw IOException()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_K2
|
||||
class C {
|
||||
Foo <caret>f;
|
||||
String <caret>f;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// ERROR: Unresolved reference: Foo
|
||||
internal class C {
|
||||
var f: Foo? = null
|
||||
}
|
||||
var f: String? = null
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_K2
|
||||
class C {
|
||||
private Foo <caret>f;
|
||||
private String <caret>f;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// ERROR: Unresolved reference: Foo
|
||||
internal class C {
|
||||
private val f: Foo? = null
|
||||
private val f: String? = null
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_K2
|
||||
class C {
|
||||
protected Foo <caret>f;
|
||||
protected String <caret>f;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// ERROR: Unresolved reference: Foo
|
||||
internal class C {
|
||||
protected var f: Foo? = null
|
||||
}
|
||||
protected var f: String? = null
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_K2
|
||||
class C {
|
||||
public Foo <caret>f;
|
||||
public String <caret>f;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// ERROR: Unresolved reference: Foo
|
||||
internal class C {
|
||||
var f: Foo? = null
|
||||
}
|
||||
var f: String? = null
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// IGNORE_K2
|
||||
class <caret>C {
|
||||
Foo f;
|
||||
String f;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// ERROR: Unresolved reference: Foo
|
||||
internal class C {
|
||||
var f: Foo = TODO()
|
||||
var f: String = TODO()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user