mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 02:38:59 +07:00
more java tests moved to community
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
// "Move assignment to field declaration" "true"
|
||||
|
||||
class X {
|
||||
int f = 0;
|
||||
X() {
|
||||
<caret>}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Move assignment to field declaration" "true"
|
||||
|
||||
class X {
|
||||
int f = 0;
|
||||
X() {
|
||||
<caret>}
|
||||
X(int i) {
|
||||
if (1==1) ;
|
||||
else {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// "Move assignment to field declaration" "true"
|
||||
|
||||
class X {
|
||||
static int f = 0;
|
||||
static {
|
||||
<caret>}
|
||||
X(int i) {
|
||||
}
|
||||
void x() {
|
||||
int i = f;
|
||||
}
|
||||
void x2() {
|
||||
f = 9;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// "Move assignment to field declaration" "true"
|
||||
|
||||
class X {
|
||||
Object f = new Runnable() {
|
||||
void x(int p) {
|
||||
int f = p;
|
||||
}
|
||||
|
||||
public void run() {
|
||||
|
||||
}
|
||||
};
|
||||
X() {
|
||||
<caret>//
|
||||
}
|
||||
|
||||
void x() {
|
||||
int i = f;
|
||||
}
|
||||
|
||||
void x2() {
|
||||
f = 9;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Move assignment to field declaration" "true"
|
||||
|
||||
class X {
|
||||
int f = 9;
|
||||
X() {
|
||||
}
|
||||
void x() {
|
||||
int i = f;
|
||||
}
|
||||
void x2() {
|
||||
<caret>}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Move assignment to field declaration" "true"
|
||||
|
||||
class X {
|
||||
int f;
|
||||
X() {
|
||||
f = <caret>0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Move assignment to field declaration" "true"
|
||||
|
||||
class X {
|
||||
int f;
|
||||
X() {
|
||||
f = <caret>0;
|
||||
}
|
||||
X(int i) {
|
||||
if (1==1) f=0; else {
|
||||
f = 0;//sds
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// "Move assignment to field declaration" "true"
|
||||
|
||||
class X {
|
||||
static int f;
|
||||
static {
|
||||
f = <caret>0;
|
||||
}
|
||||
X(int i) {
|
||||
}
|
||||
void x() {
|
||||
int i = f;
|
||||
}
|
||||
void x2() {
|
||||
f = 9;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// "Move assignment to field declaration" "true"
|
||||
|
||||
class X {
|
||||
Object f;
|
||||
X() {
|
||||
<caret>f = new Runnable() {
|
||||
void x(int p) {
|
||||
int f = p;
|
||||
}
|
||||
|
||||
public void run() {
|
||||
|
||||
}
|
||||
};
|
||||
//
|
||||
}
|
||||
|
||||
void x() {
|
||||
int i = f;
|
||||
}
|
||||
|
||||
void x2() {
|
||||
f = 9;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Move assignment to field declaration" "true"
|
||||
|
||||
class X {
|
||||
int f;
|
||||
X() {
|
||||
}
|
||||
void x() {
|
||||
int i = f;
|
||||
}
|
||||
void x2() {
|
||||
<caret>f = 9;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// "Move assignment to field declaration" "false"
|
||||
class UU extends U {
|
||||
Runnable f;
|
||||
int f2;
|
||||
|
||||
public UU() {
|
||||
final int outer = 0;
|
||||
f <caret>= new Runnable() {
|
||||
int t;
|
||||
public void run() {
|
||||
t=0;
|
||||
t = outer;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Move assignment to field declaration" "false"
|
||||
public class X {
|
||||
int i=7;
|
||||
{
|
||||
i=<caret>0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Move assignment to field declaration" "false"
|
||||
public class X {
|
||||
int i;
|
||||
X(int from)
|
||||
{
|
||||
<caret>i=from;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Move assignment to field declaration" "false"
|
||||
public class X {
|
||||
int i;
|
||||
{
|
||||
i = 0;
|
||||
i = <caret>2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Move assignment to field declaration" "false"
|
||||
public class X {
|
||||
int <caret>i=7;
|
||||
{
|
||||
i=0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Move assignment to field declaration" "false"
|
||||
public class X {
|
||||
int i;
|
||||
void f()
|
||||
{
|
||||
<caret>i=0;
|
||||
}
|
||||
{
|
||||
i=1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user