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

Comparing jsr166/src/test/jtreg/util/PriorityQueue/PriorityQueueSort.java (file contents):
Revision 1.4 by jsr166, Thu Apr 20 17:42:52 2006 UTC vs.
Revision 1.7 by jsr166, Mon May 21 16:44:31 2007 UTC

# Line 1 | Line 1
1   /*
2 + * Written by Doug Lea with assistance from members of JCP JSR-166
3 + * Expert Group and released to the public domain, as explained at
4 + * http://creativecommons.org/licenses/publicdomain
5 + */
6 +
7 + /*
8   * @test %I% %E%
9   * @bug 4486658
10   * @summary Checks that a priority queue returns elements in sorted order across various operations
# Line 8 | Line 14 | import java.util.*;
14  
15   public class PriorityQueueSort {
16  
17 <    static class MyComparator implements Comparator<Integer> {
17 >    static class MyComparator implements Comparator<Integer> {
18          public int compare(Integer x, Integer y) {
19              int i = x.intValue();
20              int j = y.intValue();
# Line 22 | Line 28 | public class PriorityQueueSort {
28          int n = 10000;
29          if (args.length > 0)
30              n = Integer.parseInt(args[0]);
31 <        
31 >
32          List<Integer> sorted = new ArrayList<Integer>(n);
33          for (int i = 0; i < n; i++)
34              sorted.add(new Integer(i));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines