Fixing some unit tests

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7234 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Andreas Dangel
2011-09-09 16:45:46 +00:00
parent cdcecf6dff
commit 23b313075f
3 changed files with 5 additions and 5 deletions

View File

@ -197,7 +197,7 @@ public class AbstractRuleTest {
MyRule r2 = new MyRule();
r2.setMessage("another message");
assertEquals("Rules with different messages are still equal", r1, r2);
assertSame("Rules that are equal must have the same hashcode", r1.hashCode(), r2.hashCode());
assertEquals("Rules that are equal must have the an equal hashcode", r1.hashCode(), r2.hashCode());
}

View File

@ -3,9 +3,9 @@ package test.net.sourceforge.pmd.lang.java.rule.typeresolution.xml;
import junit.framework.TestCase;
/**
* Warning, this class ARE not useless.
* It is used by the some of regression
* tests.
* Warning, this class IS NOT useless.
* It is used by the some regression tests.
*
* See file: SignatureDeclareThrowsException.xml
*
* The file is already excluded from maven/surefire.

View File

@ -157,7 +157,7 @@ After checking an object reference for null, you should invoke equals() on that
<property name="xpath">
<value>
<![CDATA[
(//PrimaryPrefix[ends-with(Name/@Image, '.equals')] | //PrimarySuffix[@Image='equals' and not(../PrimaryPrefix/Literal)])
(//PrimaryPrefix[ends-with(Name/@Image, '.equals') and Name/@Image != 'Arrays.equals'] | //PrimarySuffix[@Image='equals' and not(../PrimaryPrefix/Literal)])
/following-sibling::PrimarySuffix/Arguments/ArgumentList/Expression
/PrimaryExpression[count(PrimarySuffix)=0]/PrimaryPrefix
/Name[@Image = ./../../../../../../../../../../Expression/ConditionalAndExpression