moving tests to CE

This commit is contained in:
Dmitry Jemerov
2009-09-25 21:34:06 +04:00
parent a6d19ca1cb
commit 9d2c56074f
37 changed files with 7 additions and 0 deletions
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
</problems>
@@ -0,0 +1,10 @@
package weaker.b;
import weaker.a.A;
public class B {
public static void main(String[] args) {
A.f();
}
}
@@ -0,0 +1,11 @@
package weaker.a;
public class A {
public static void f() {
}
public static void main(String[] args) {
f();
}
}
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
</problems>
@@ -0,0 +1,12 @@
public class Bar {
public static boolean execute(boolean isFoo) {
if (isFoo) {
return new Foo().isTransparentsOnly();
}
return false;
}
boolean isTransparentsOnly() {
return false;
}
}
@@ -0,0 +1,3 @@
public class Foo extends Bar {
}
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
</problems>
@@ -0,0 +1,10 @@
class Foo {
private void method() {
final class MyClass{}
Object o = new MyClass();
}
private void foo() {
method();
}
}
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>SuperClass.java</file>
<line>3</line>
<description>package local</description>
</problem>
</problems>
@@ -0,0 +1,6 @@
package marti.p1;
class SubClass extends SuperClass{
public SubClass() {
super();
}
}
@@ -0,0 +1,5 @@
package marti.p1;
class SuperClass {
public SuperClass() {
}
}
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>A.java</file>
<line>3</line>
<description>private</description>
</problem>
<problem>
<file>A.java</file>
<line>4</line>
<description>private</description>
</problem>
</problems>
@@ -0,0 +1,13 @@
class A {
A(){}
static class B {
int k=0;
{
System.out.println(k);
}
}
public static void main(String[] args) {
new B();
}
}
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
</problems>
@@ -0,0 +1,3 @@
public @interface Observer {
String value();
}
@@ -0,0 +1,6 @@
public class Test {
public static final String CONST = "const";
public static void main(String[] args){
System.out.println(CONST);
}
}
@@ -0,0 +1,8 @@
@Observer(Test.CONST)
class Usage {
@Observer(Test.CONST)
int f;
@Observer(Test.CONST)
void foo(){}
}
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
</problems>
@@ -0,0 +1 @@
<root>Test</root>
@@ -0,0 +1,6 @@
public class Test implements java.lang.Clonable {
public Test(){}
public Object clone() {
return new Test();
}
}
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
</problems>
@@ -0,0 +1,7 @@
public enum Foo {
BAR, UNUSED;
public static void main(String[] args){
System.out.println(BAR);
}
}
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
</problems>
@@ -0,0 +1 @@
<root>Test</root>
@@ -0,0 +1,5 @@
public class Test implements java.lang.Clonable {
public Object clone() {
return new Test();
}
}
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>Foo.java</file>
<line>4</line>
<description>private</description>
</problem>
</problems>
@@ -0,0 +1,7 @@
class Foo {
private final Bar bar = new Bar();
private class Bar {
public Bar() {
}
}
}
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>PackageLevelServer.java</file>
<line>3</line>
<description>package local</description>
</problem>
</problems>
@@ -0,0 +1,5 @@
package package1;
public class PackageLevelServer {
public static void foo() {}
}
@@ -0,0 +1,5 @@
package package1;
public class PublicServer {
public static void foo() {}
}
@@ -0,0 +1,9 @@
package package2;
import package1.PublicServer;
class Client {
public static void main(String args[]) {
PublicServer.foo();
}
}
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems/>
@@ -0,0 +1,14 @@
public abstract class AbstractSetup<T extends AbstractSetupParams>
{
private T parameters;
public T getParameters()
{
return parameters;
}
protected void setParameters(T pParameters)
{
parameters = pParameters;
}
}
@@ -0,0 +1,3 @@
public class AbstractSetupParams
{
}
@@ -0,0 +1,33 @@
public final class ChildClass extends Superclass<ChildClass.Param, ChildClass.Setup>
{
// --- FIELDS ---
private ChildClass()
{
}
// --- OTHER METHODS ---
@Override
protected Setup createInitializer()
{
return new ChildClass.Setup();
}
class Param extends AbstractSetupParams
{
}
private class Setup extends AbstractSetup<Param>
{
}
public static void main(String[] args) {}
}
@@ -0,0 +1,8 @@
public abstract class Superclass<TParam extends AbstractSetupParams, TSetup extends AbstractSetup<TParam>>
{
protected abstract TSetup createInitializer();
}