mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
more java tests moved to community
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
// "Change signature of 'f(int)' to 'f()'" "true"
|
||||
class A {
|
||||
void f() {}
|
||||
public void foo() {
|
||||
<caret>f();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// "Change signature of 'set(List<T>)' to 'set(List<T>, String)'" "true"
|
||||
import java.util.List;
|
||||
|
||||
public class X<T> {
|
||||
private List<T> myList;
|
||||
|
||||
public void set(List<T> list, String s) {
|
||||
myList = list;
|
||||
}
|
||||
|
||||
public static void aa() {
|
||||
X<Integer> x = new X<Integer>();
|
||||
x.set<caret>(null, "aaa");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Change signature of 'f(int, String)' to 'f()'" "true"
|
||||
class A {
|
||||
void f() {}
|
||||
public void foo() {
|
||||
<caret>f();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Change signature of 'f(int, String)' to 'f(int, char, String)'" "true"
|
||||
class A {
|
||||
void f(int i, char c, String s) {}
|
||||
public void foo() {
|
||||
<caret>f(1,'2',"");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Change signature of 'f(int, String)' to 'f(int, char, int, String, int, Object)'" "true"
|
||||
class A {
|
||||
void f(int i, char c, int i1, String s, int i2, Object o) {}
|
||||
public void foo() {
|
||||
<caret>f(1,'2',4,"",1,null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Change signature of 'f(int, String, int)' to 'f(int, int)'" "true"
|
||||
class A {
|
||||
void f(int i, int i2) {}
|
||||
public void foo() {
|
||||
<caret>f(1,1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Change signature of 'f(int, String, int)' to 'f(int, int, int)'" "true"
|
||||
class A {
|
||||
void f(int i, int s, int i2) {}
|
||||
public void foo() {
|
||||
<caret>f(1,1,'4');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Change signature of 'f(int, String, int, int, char, String)' to 'f(int, int, String)'" "true"
|
||||
class A {
|
||||
void f(int i, int i2, String s) {}
|
||||
public void foo() {
|
||||
<caret>f(1,1,"4");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Change signature of 'A()' to 'A(int, int, String)'" "true"
|
||||
class A {
|
||||
A(int i, int i1, String s) {
|
||||
new A<caret>(1,1,"4");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Change signature of 'f(int, int...)' to 'f(int, int, int...)'" "true"
|
||||
public class S {
|
||||
void f(int k, int i, int... args) {
|
||||
f(1,1,null)<caret>;// -> f(1,1,null)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Change signature of 'Inner2()' to 'Inner2(CoolTest.Inner1)'" "true"
|
||||
class CoolTest {
|
||||
class Inner1 {}
|
||||
|
||||
void method() {
|
||||
new Inner2(new Inner1());
|
||||
}
|
||||
|
||||
class Inner2 {
|
||||
Inner2(Inner1 inner1) { }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Change signature of 'f(int)' to 'f()'" "true"
|
||||
class A {
|
||||
void f(int i) {}
|
||||
public void foo() {
|
||||
<caret>f();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// "Change signature of 'set(List<T>)' to 'set(List<T>, String)'" "true"
|
||||
import java.util.List;
|
||||
|
||||
public class X<T> {
|
||||
private List<T> myList;
|
||||
|
||||
public void set(List<T> list) {
|
||||
myList = list;
|
||||
}
|
||||
|
||||
public static void aa() {
|
||||
X<Integer> x = new X<Integer>();
|
||||
x.set<caret>(null, "aaa");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Change signature of 'f(int, String)' to 'f()'" "true"
|
||||
class A {
|
||||
void f(int i,String s) {}
|
||||
public void foo() {
|
||||
<caret>f();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Change signature of 'f(int, String)' to 'f(int, char, String)'" "true"
|
||||
class A {
|
||||
void f(int i,String s) {}
|
||||
public void foo() {
|
||||
<caret>f(1,'2',"");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Change signature of 'f(int, String)' to 'f(int, char, int, String, int, Object)'" "true"
|
||||
class A {
|
||||
void f(int i,String s) {}
|
||||
public void foo() {
|
||||
<caret>f(1,'2',4,"",1,null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Change signature of 'f(int, String, int)' to 'f(int, int)'" "true"
|
||||
class A {
|
||||
void f(int i, String s, int i2) {}
|
||||
public void foo() {
|
||||
<caret>f(1,1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Change signature of 'f(int, String, int)' to 'f(int, int, int)'" "true"
|
||||
class A {
|
||||
void f(int i, String s, int i2) {}
|
||||
public void foo() {
|
||||
<caret>f(1,1,'4');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Change signature of 'f(int, String, int, int, char, String)' to 'f(int, int, String)'" "true"
|
||||
class A {
|
||||
void f(int i, String s, int i2, int i3, char c, String s) {}
|
||||
public void foo() {
|
||||
<caret>f(1,1,"4");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Change signature of 'A()' to 'A(int, int, String)'" "true"
|
||||
class A {
|
||||
A() {
|
||||
new A<caret>(1,1,"4");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Change signature of 'f(int, int...)' to 'f(int, int, int...)'" "true"
|
||||
public class S {
|
||||
void f(int k, int... args) {
|
||||
f(1,1,null)<caret>;// -> f(1,1,null)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Change signature of 'f(String)' to 'f(int)'" "false"
|
||||
public class Foo {
|
||||
void foo(Bar f) {
|
||||
f.f<caret>(2);
|
||||
}
|
||||
}
|
||||
class Bar {
|
||||
private void f(int i){}
|
||||
public void f(String s){}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Change signature of 'parseInt(String)' to 'parseInt(int)'" "false"
|
||||
class A {
|
||||
public void foo() {
|
||||
<caret>Integer.parseInt(1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Change signature of 'Inner2()' to 'Inner2(CoolTest.Inner1)'" "true"
|
||||
class CoolTest {
|
||||
class Inner1 {}
|
||||
|
||||
void method() {
|
||||
new Inner2(new In<caret>ner1());
|
||||
}
|
||||
|
||||
class Inner2 {
|
||||
Inner2() { }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user