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

Comparing jsr166/src/test/loops/IntMapCheck.java (file contents):
Revision 1.13 by jsr166, Wed Dec 31 17:00:58 2014 UTC vs.
Revision 1.14 by jsr166, Thu Jan 15 18:34:19 2015 UTC

# Line 34 | Line 34 | public class IntMapCheck {
34              }
35          }
36  
37
37          if (args.length > 1)
38              numTests = Integer.parseInt(args[1]);
39  
# Line 68 | Line 67 | public class IntMapCheck {
67  
68          TestTimer.printStats();
69  
71
70          if (doSerializeTest)
71              stest(newMap(mapClass), size);
72      }
# Line 82 | Line 80 | public class IntMapCheck {
80          }
81      }
82  
85
83      static void runTest(Map<Integer,Integer> s, Integer[] key) {
84          int size = key.length;
85          long startTime = System.nanoTime();
# Line 115 | Line 112 | public class IntMapCheck {
112          reallyAssert(sum == expect * iters);
113      }
114  
118
115      static void t2(String nm, int n, Map<Integer,Integer> s, Integer[] key, int expect) {
116          int sum = 0;
117          timer.start(nm, n);
# Line 190 | Line 186 | public class IntMapCheck {
186          reallyAssert(sum == expect);
187      }
188  
193
189      static void t9(Map<Integer,Integer> s) {
190          int sum = 0;
191          int iters = 20;
# Line 202 | Line 197 | public class IntMapCheck {
197          reallyAssert(sum != 0);
198      }
199  
205
200      static void ktest(Map<Integer,Integer> s, int size, Integer[] key) {
201          timer.start("ContainsKey            ", size);
202          Set ks = s.keySet();
# Line 214 | Line 208 | public class IntMapCheck {
208          reallyAssert(sum == size);
209      }
210  
217
211      static void ittest1(Map<Integer,Integer> s, int size) {
212          int sum = 0;
213          timer.start("Iter Key               ", size);
# Line 286 | Line 279 | public class IntMapCheck {
279          reallyAssert(s.size() == size);
280      }
281  
289
282      static void ittest(Map<Integer,Integer> s, int size) {
283          for (int i = 0; i < 4; ++i) {
284              ittest1(s, size);
# Line 320 | Line 312 | public class IntMapCheck {
312          reallyAssert(sum == size);
313      }
314  
323
315      static void entest3(Hashtable ht, int size) {
316          int sum = 0;
317  
# Line 399 | Line 390 | public class IntMapCheck {
390          reallyAssert(s.equals(m));
391      }
392  
402
393      static void test(Map<Integer,Integer> s, Integer[] key) {
394          int size = key.length;
395  
# Line 551 | Line 541 | public class IntMapCheck {
541              startTime = System.nanoTime();
542          }
543  
554
544          String classify() {
545              if (name.startsWith("Get"))
546                  return "Get                    ";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines