more java tests moved to community

This commit is contained in:
Alexey Kudravtsev
2010-06-25 10:48:17 +04:00
parent 735a9d17a8
commit 2718da9fc7
1139 changed files with 14287 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
// "Change signature of 'f(int)' to 'f()'" "true"
class A {
void f() {}
public void foo() {
<caret>f();
}
}

View File

@@ -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");
}
}

View File

@@ -0,0 +1,7 @@
// "Change signature of 'f(int, String)' to 'f()'" "true"
class A {
void f() {}
public void foo() {
<caret>f();
}
}

View File

@@ -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',"");
}
}

View File

@@ -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);
}
}

View File

@@ -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);
}
}

View File

@@ -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');
}
}

View File

@@ -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");
}
}

View File

@@ -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");
}
}

View File

@@ -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)
}
}

View File

@@ -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) { }
}
}

View File

@@ -0,0 +1,7 @@
// "Change signature of 'f(int)' to 'f()'" "true"
class A {
void f(int i) {}
public void foo() {
<caret>f();
}
}

View File

@@ -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");
}
}

View File

@@ -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();
}
}

View File

@@ -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',"");
}
}

View File

@@ -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);
}
}

View File

@@ -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);
}
}

View File

@@ -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');
}
}

View File

@@ -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");
}
}

View File

@@ -0,0 +1,6 @@
// "Change signature of 'A()' to 'A(int, int, String)'" "true"
class A {
A() {
new A<caret>(1,1,"4");
}
}

View File

@@ -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)
}
}

View File

@@ -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){}
}

View File

@@ -0,0 +1,6 @@
// "Change signature of 'parseInt(String)' to 'parseInt(int)'" "false"
class A {
public void foo() {
<caret>Integer.parseInt(1);
}
}

View File

@@ -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() { }
}
}