You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2007/05/03 21:56:15 UTC

[jira] Closed: (COLLECTIONS-232) Some tests contain assertEquals arguments in the incorrect order

     [ https://issues.apache.org/jira/browse/COLLECTIONS-232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Yandell closed COLLECTIONS-232.
-------------------------------------

    Resolution: Fixed

Thanks Mark, patch applied.

svn ci -m "Applying Mark Hindess' patch from COLLECTIONS-232 that cleans up the ordering of various assertEquals to be expected,actual and not actual,expected and also fixes various assertEquals to assertNulls where applicable" src/

Sending        src/test/org/apache/commons/collections/TestArrayList.java
Sending        src/test/org/apache/commons/collections/TestArrayStack.java
Sending        src/test/org/apache/commons/collections/TestCollectionUtils.java
Sending        src/test/org/apache/commons/collections/TestExtendedProperties.java
Sending        src/test/org/apache/commons/collections/TestMapUtils.java
Sending        src/test/org/apache/commons/collections/TestTreeMap.java
Sending        src/test/org/apache/commons/collections/buffer/TestPredicatedBuffer.java
Sending        src/test/org/apache/commons/collections/collection/AbstractTestCollection.java
Sending        src/test/org/apache/commons/collections/collection/TestCompositeCollection.java
Sending        src/test/org/apache/commons/collections/list/AbstractTestList.java
Sending        src/test/org/apache/commons/collections/map/AbstractTestMap.java
Sending        src/test/org/apache/commons/collections/map/TestCaseInsensitiveMap.java
Sending        src/test/org/apache/commons/collections/map/TestLazySortedMap.java
Sending        src/test/org/apache/commons/collections/map/TestPredicatedSortedMap.java
Transmitting file data ..............
Committed revision 534976.

> Some tests contain assertEquals arguments in the incorrect order
> ----------------------------------------------------------------
>
>                 Key: COLLECTIONS-232
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-232
>             Project: Commons Collections
>          Issue Type: Improvement
>            Reporter: Mark Hindess
>            Priority: Trivial
>             Fix For: 3.3
>
>         Attachments: fix.assertEquals.usage.diff
>
>
> A few tests have the expected and actual arguments to assertEquals in the wrong order.  This can lead to very confusing failure messages.  I'll attach a patch to fix some of the more obvious ones.  I've also replaced a couple of assertTrue(blah.size() == 0) with assertEquals(0, blah.size()) since the later typically gives a more helpful failure message.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org