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

Comparing jsr166/src/test/loops/IntegerSum.java (file contents):
Revision 1.1 by dl, Thu Feb 28 11:41:56 2013 UTC vs.
Revision 1.2 by jsr166, Thu Feb 28 16:33:53 2013 UTC

# Line 36 | Line 36 | public class IntegerSum {
36          }
37      }
38  
39 <    static String sep() { return print? "\n" : " "; }
39 >    static String sep() { return print ? "\n" : " "; }
40  
41      static void allTests(int size, int trials) throws Exception {
42          System.out.println("---------------------------------------------");
# Line 112 | Line 112 | public class IntegerSum {
112              throw new Error("bad computation");
113      }
114  
115 <    static void ctest(Collection<Integer> c, List<Integer> klist, int ksum, int size, int trials)
115 >    static void ctest(Collection<Integer> c, List<Integer> klist, int ksum, int size, int trials)
116          throws Exception {
117          String cn = c.getClass().getName();
118          if (cn.startsWith("java.util.concurrent."))
# Line 160 | Line 160 | public class IntegerSum {
160          long tlast =  System.nanoTime();
161          for (int i = 0; i < trials; ++i) {
162              Integer psum = Integer.valueOf(checksum.get());
163 <            for (Integer x : c)
163 >            for (Integer x : c)
164                  psum = SUM.apply(psum, x);
165              checksum.getAndAdd(sum - psum);
166          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines