java highlighting tests moved to community

This commit is contained in:
Alexey Kudravtsev
2010-06-24 15:54:13 +04:00
parent 7ec040c1ec
commit 735a9d17a8
243 changed files with 22082 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
// silly asignment
import javax.swing.*;
class a {
int f;
JPanel fpanel;
void f(int i) {
<warning descr="Variable is assigned to itself">i = i</warning>;
}
void f2() {
<warning descr="Variable is assigned to itself">this.f = f</warning>;
<warning descr="Variable is assigned to itself">a.this.f = f</warning>;
<warning descr="Variable is assigned to itself">f = this.f</warning>;
}
void f3(Object o) {
int i = 0;
<warning descr="Variable is assigned to itself">i = i</warning>;
<warning descr="Variable is assigned to itself">i = (int)i</warning>;
<warning descr="Variable is assigned to itself">o = ((Object)(o))</warning>;
}
void f4() {
fpanel.getSize().height = this.fpanel.getSize().height; // not silly. Are you sure you can bet getSize() has no side effects?
}
void cf1() {
JPanel a = new JPanel(), b = new JPanel();
a.getSize().height = b.getSize().height; // not silly!
}
void cf2(a aa) {
aa.f = f;
}
}