moving tests to CE

This commit is contained in:
Dmitry Jemerov
2009-09-25 20:54:27 +04:00
parent b7929673b6
commit 2912d6965b
7 changed files with 8 additions and 2 deletions
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>A.java</file>
<line>1</line>
<description>Class has &lt;code&gt;equals()&lt;/code&gt; defined but does not define &lt;code&gt;hashCode()&lt;/code&gt;.</description>
</problem>
<problem>
<file>B.java</file>
<line>1</line>
<description>Class has &lt;code&gt;hashCode()&lt;/code&gt; defined but does not define &lt;code&gt;equals()&lt;/code&gt;.</description>
</problem>
</problems>
@@ -0,0 +1,5 @@
class A {
public boolean equals(final Object o) {
return this == o;
}
}
@@ -0,0 +1,5 @@
class B extends A {
public int hashCode() {
return 31;
}
}
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>Test.java</file>
<line>2</line>
<description>Class has &lt;code&gt;equals()&lt;/code&gt; defined but does not define &lt;code&gt;hashCode()&lt;/code&gt;.</description>
</problem>
</problems>
@@ -0,0 +1,7 @@
class Test {
class Inner {
public boolean equals(final Object o) {
return this == o;
}
}
}