This is the mail archive of the mauve-discuss@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: Fix HashMap / LinkedHashMap tests


Classpath has been changed so that Iterator.hasNext() no longer checks for concurrent modification, causing two tests to fail. This patch updates the tests to look for the new behaviour instead.

Bryce

2006-05-01  Bryce McKinlay  <mckinlay@redhat.com>

	* gnu/testlet/java/util/HashMap/AcuniaHashMapTest.java
	(test_entrySet): Iterator.hasNext() does not throw
	ConcurrentModificationException - update test accordingly.
	* gnu/testlet/java/util/LinkedHashMap/LinkedHashMapTest.java
	(test_entrySet): Likewise.

Index: gnu/testlet/java/util/HashMap/AcuniaHashMapTest.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/util/HashMap/AcuniaHashMapTest.java,v
retrieving revision 1.4
diff -u -r1.4 AcuniaHashMapTest.java
--- gnu/testlet/java/util/HashMap/AcuniaHashMapTest.java	21 Feb 2005 15:52:50 -0000	1.4
+++ gnu/testlet/java/util/HashMap/AcuniaHashMapTest.java	1 May 2006 22:15:16 -0000
@@ -326,10 +326,10 @@
     th.check( s.size() == 15 );
     try {
     	th.check(it.hasNext());
-	th.fail("it.hasNext after hm.remove should throw ConcurrentModificationException");
+	th.check(true);
     }
     catch(ConcurrentModificationException cme) {
-	th.check(true);
+	th.fail("it.hasNext should not throw ConcurrentModificationException");
     }
     try {
     	it.next();
Index: gnu/testlet/java/util/LinkedHashMap/LinkedHashMapTest.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/util/LinkedHashMap/LinkedHashMapTest.java,v
retrieving revision 1.2
diff -u -r1.2 LinkedHashMapTest.java
--- gnu/testlet/java/util/LinkedHashMap/LinkedHashMapTest.java	19 Feb 2005 03:03:34 -0000	1.2
+++ gnu/testlet/java/util/LinkedHashMap/LinkedHashMapTest.java	1 May 2006 22:15:16 -0000
@@ -258,10 +258,10 @@
     th.check( hm.size() == 15 );
     try {
     	th.check(it.hasNext());
-	th.fail("it.hasNext after hm.remove should throw ConcurrentModificationException");
+	th.check(true);
     }
     catch(ConcurrentModificationException cme) {
-	th.check(true);
+	th.fail("it.hasNext should not throw ConcurrentModificationException");
     }
     try {
     	it.next();

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]