harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Harley (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-20) java.util.Collections rotate() gives incorrect result with distance parameter of min possible integer value
Date Fri, 02 Dec 2005 12:56:30 GMT
java.util.Collections rotate() gives incorrect result with distance parameter of min possible
integer value
-----------------------------------------------------------------------------------------------------------

         Key: HARMONY-20
         URL: http://issues.apache.org/jira/browse/HARMONY-20
     Project: Harmony
        Type: Bug
  Components: Contributions  
 Environment: All
    Reporter: George Harley
 Assigned to: Geir Magnusson Jr 
    Priority: Minor


This unit test fails against the contribution. 

	public void testRotateListByMinInteger() {
		List list = new ArrayList();
		list.add(0, "zero");
		list.add(1, "one");
		list.add(2, "two");
		list.add(3, "three");
		list.add(4, "four");

		Collections.rotate(list, Integer.MIN_VALUE);
		assertEquals("Rotated incorrectly at position 0, ", "three",
				(String) list.get(0));
		assertEquals("Rotated incorrectly at position 1, ", "four",
				(String) list.get(1));
		assertEquals("Rotated incorrectly at position 2, ", "zero",
				(String) list.get(2));
		assertEquals("Rotated incorrectly at position 3, ", "one",
				(String) list.get(3));
		assertEquals("Rotated incorrectly at position 4, ", "two",
				(String) list.get(4));
	}



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message