more java tests moved to community

This commit is contained in:
Alexey Kudravtsev
2010-06-25 12:46:40 +04:00
parent 735a9d17a8
commit 2718da9fc7
1139 changed files with 14287 additions and 0 deletions
@@ -0,0 +1,12 @@
// "Create Field 'field'" "true"
class Main {
static void foo() {
new Object() {
public int field<caret>;
void bar() {
this.field = 0;
}
};
}
}
@@ -0,0 +1,14 @@
// "Create Field 'panel'" "true"
import javax.swing.*;
class Test {
private JPanel panel;
void foo(JPanel container) {
if (panel == null) {
panel = new JPanel();
panel.setOpaque(true);
container.add(panel);
}
}
}
@@ -0,0 +1,10 @@
// "Create Field 'FIELD'" "true"
class C {
public void foo() {
int i = ITest.FIELD;
}
public static interface ITest {
int FIELD<caret>;
}
}
@@ -0,0 +1,9 @@
// "Create Field 'fld'" "true"
class A {
private String fld<caret>;
public void foo() {
Object x = fld;
fld = "";
}
}
@@ -0,0 +1,9 @@
// "Create Field 'fld'" "true"
class A {
private String fld<caret>;
public void foo() {
Object x = fld;
String s = fld;
}
}
@@ -0,0 +1,15 @@
// "Create Field 'array'" "true"
class Smth<T> {
}
class Converter {
static <T> Smth<T> asSmth (T[] t) {}
}
class Test {
private String[] array<caret>;
void bar () {
Smth<String> l = Converter.asSmth(array);
}
}
@@ -0,0 +1,14 @@
// "Create Field 'field'" "true"
class A{
private Outer.Inner field<caret>;
{
Outer.f(field);
}
}
class Outer{
static class Inner{}
static void f(Inner inner){}
}
@@ -0,0 +1,10 @@
// "Create Field 'field'" "true"
class Main {
static void foo() {
new Object() {
void bar() {
this.<caret>field = 0;
}
};
}
}
@@ -0,0 +1,12 @@
// "Create Field 'panel'" "true"
import javax.swing.*;
class Test {
void foo(JPanel container) {
if (p<caret>anel == null) {
panel = new JPanel();
panel.setOpaque(true);
container.add(panel);
}
}
}
@@ -0,0 +1,9 @@
// "Create Field 'FIELD'" "true"
class C {
public void foo() {
int i = ITest.FIELD<caret>;
}
public static interface ITest {
}
}
@@ -0,0 +1,7 @@
// "Create Field 'fld'" "true"
class A {
public void foo() {
Object x = <caret>fld;
fld = "";
}
}
@@ -0,0 +1,7 @@
// "Create Field 'fld'" "true"
class A {
public void foo() {
Object x = <caret>fld;
String s = fld;
}
}
@@ -0,0 +1,6 @@
// "Field not created" "false"
class C {
void foo() {
te<caret>st();
}
}
@@ -0,0 +1,13 @@
// "Create Field 'array'" "true"
class Smth<T> {
}
class Converter {
static <T> Smth<T> asSmth (T[] t) {}
}
class Test {
void bar () {
Smth<String> l = Converter.asSmth(a<caret>rray);
}
}
@@ -0,0 +1,12 @@
// "Create Field 'field'" "true"
class A{
{
Outer.f(field<caret>);
}
}
class Outer{
static class Inner{}
static void f(Inner inner){}
}