moving tests to CE

This commit is contained in:
Dmitry Jemerov
2009-09-25 20:36:52 +04:00
parent ec0a5c9294
commit 64ecc03e67
26 changed files with 6 additions and 0 deletions
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>A.java</file>
<line>2</line>
<description>final</description>
</problem>
</problems>
@@ -0,0 +1,6 @@
final class A {
int b;
A(int c) {
b=c;
}
}
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>A.java</file>
<line>2</line>
<description>final</description>
</problem>
</problems>
@@ -0,0 +1,12 @@
final class A {
int m;
int k;
A() {
k=0;
m=0;
}
A(int n) {
this();
k=n;
}
}
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
</problems>
@@ -0,0 +1,3 @@
final class A {
int k;
}
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>A.java</file>
<line>2</line>
<description>final</description>
</problem>
</problems>
@@ -0,0 +1,12 @@
final class A {
int k;
int m;
{
k = 0;
m = 0;
}
A() {
m = 0;
}
}
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
</problems>
@@ -0,0 +1,6 @@
// B.java
class B extends A {
public final void run() {
}
}
@@ -0,0 +1,6 @@
// A.java
class A implements Runnable {
public void run() {
}
}
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems />
@@ -0,0 +1,10 @@
public final class Foo {
private String s;
public Foo() {
try {
s = "test";
} catch (Exception e) {
}
}
}
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>Foo.java</file>
<line>3</line>
<description>final</description>
</problem>
</problems>
@@ -0,0 +1,23 @@
public final class Foo {
private Object f1 = new Object(); // Can be final but unused
private Object f2; // Can be final
private Object f3; // Cannot be final
private Object f4; // cannot
private Object f5 = new Object(); // cannot
public Foo() {
f2 = new Object();
try {
f3 = "test";
} catch (Exception e) {
}
f5 = new Object();
}
public Foo(int i) {
f2 = new Object();
f4 = new Object();
f5 = new Object();
}
}
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>Foo.java</file>
<line>3</line>
<description>final</description>
</problem>
</problems>
@@ -0,0 +1,27 @@
public final class Foo {
private Object f1 = new Object(); // Can be final but unused
private Object f2; // Can be final
private Object f3; // Cannot be final
private Object f4; // cannot
private Object f5 = new Object(); // cannot
public Foo() {
f2 = new Object();
try {
f3 = "test";
} catch (Exception e) {
}
f5 = new Object();
}
public Foo(int i) {
f2 = new Object();
f4 = new Object();
f5 = new Object();
}
public Object getF2(){
return f2;
}
}
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems />
@@ -0,0 +1,10 @@
public final class a {
public final void foo() {
}
}
final class b extends a {
public void foo() {}
}
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>Foo.java</file>
<line>8</line>
<description>Declaration can have final modifier</description>
</problem>
</problems>
@@ -0,0 +1,10 @@
public final class Foo {
private class InnerSuper {
}
private final class InnerInheritor1 extends InnerSuper {
}
private class InnerInheritor2 extends InnerSuper {
}
}
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems />
@@ -0,0 +1,5 @@
public final class Foo extends Bar {
}
class Bar {
}
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>Foo.java</file>
<line>1</line>
<description>Declaration can have final modifier</description>
</problem>
</problems>
@@ -0,0 +1,5 @@
public class Foo extends Bar {
}
class Bar {
}