ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/jtreg/util/Collection/IteratorMicroBenchmark.java
(Generate patch)

Comparing jsr166/src/test/jtreg/util/Collection/IteratorMicroBenchmark.java (file contents):
Revision 1.45 by jsr166, Fri May 11 18:19:10 2018 UTC vs.
Revision 1.46 by jsr166, Fri May 11 22:35:32 2018 UTC

# Line 564 | Line 564 | public class IteratorMicroBenchmark {
564                          sum[0] = 0;
565                          x.replaceAll(sneakyAdder);
566                          check.sum(sum[0]);}}},
567 +            new Job(klazz + " equals") {
568 +                public void work() throws Throwable {
569 +                    ArrayList<Integer> copy = new ArrayList<>(x);
570 +                    for (int i = 0; i < iterations; i++) {
571 +                        if (!x.equals(copy))
572 +                            throw new AssertionError();}}},
573              new Job(klazz + " hashCode") {
574                  public void work() throws Throwable {
575                      int hashCode = Arrays.hashCode(x.toArray());

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines