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

Comparing jsr166/src/test/tck/PriorityQueueTest.java (file contents):
Revision 1.43 by jsr166, Mon May 29 22:44:27 2017 UTC vs.
Revision 1.46 by jsr166, Sun May 6 22:26:24 2018 UTC

# Line 28 | Line 28 | public class PriorityQueueTest extends J
28              public boolean isConcurrent() { return false; }
29              public boolean permitsNulls() { return false; }
30          }
31 <        return newTestSuite(PriorityQueueTest.class,
32 <                            CollectionTest.testSuite(new Implementation()));
31 >        class ComparatorImplementation implements CollectionImplementation {
32 >            public Class<?> klazz() { return PriorityQueue.class; }
33 >            public Collection emptyCollection() {
34 >                return new PriorityQueue(new MyReverseComparator());
35 >            }
36 >            public Object makeElement(int i) { return i; }
37 >            public boolean isConcurrent() { return false; }
38 >            public boolean permitsNulls() { return false; }
39 >        }
40 >        return newTestSuite(
41 >            PriorityQueueTest.class,
42 >            CollectionTest.testSuite(new Implementation()),
43 >            CollectionTest.testSuite(new ComparatorImplementation()));
44      }
45  
46 <    static class MyReverseComparator implements Comparator {
46 >    static class MyReverseComparator implements Comparator, java.io.Serializable {
47          public int compare(Object x, Object y) {
48              return ((Comparable)y).compareTo(x);
49          }
# Line 495 | Line 506 | public class PriorityQueueTest extends J
506      }
507  
508      /**
509 <     * A deserialized serialized queue has same elements
509 >     * A deserialized/reserialized queue has same elements
510       */
511      public void testSerialization() throws Exception {
512          Queue x = populatedQueue(SIZE);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines