ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/MapCheck.java
(Generate patch)

Comparing jsr166/src/test/loops/MapCheck.java (file contents):
Revision 1.2 by dl, Mon May 9 19:33:30 2005 UTC vs.
Revision 1.3 by dl, Thu Sep 15 16:55:40 2005 UTC

# Line 230 | Line 230 | public class MapCheck {
230      }
231      static void ittest3(Map s, int size) {
232          int sum = 0;
233 +        int hsum = 0;
234          timer.start("Iter Entry             ", size);
235          for (Iterator it = s.entrySet().iterator(); it.hasNext(); ) {
236 <            if(it.next() != MISSING)
236 >            Map.Entry e = (Map.Entry)it.next();
237 >            if(e != MISSING) {
238 >                hsum += System.identityHashCode(e.getKey());
239 >                hsum += System.identityHashCode(e.getValue());
240 >                hsum >>>= 1;
241                  ++sum;
242 +            }
243          }
244          timer.finish();
245 +        reallyAssert(size == 0 || hsum >= 0);
246          reallyAssert (sum == size);
247      }
248  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines