public inbox for mauve-discuss@sourceware.org
 help / color / mirror / Atom feed
* FYI: Fix HashMap / LinkedHashMap tests
@ 2006-05-01 22:31 Bryce McKinlay
  0 siblings, 0 replies; only message in thread
From: Bryce McKinlay @ 2006-05-01 22:31 UTC (permalink / raw)
  To: mauve-discuss

[-- Attachment #1: Type: text/plain, Size: 205 bytes --]

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


[-- Attachment #2: mauve-iterator-concurrentmodification.patch --]
[-- Type: text/x-patch, Size: 1987 bytes --]

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();

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-05-01 22:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-01 22:31 FYI: Fix HashMap / LinkedHashMap tests Bryce McKinlay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).