提交 e48f93eb 编写于 作者: M mduigou

8021601: Add unit test for PriorityQueue(Comparator) constructor

Reviewed-by: darcy, alanb
上级 5e9de653
......@@ -136,8 +136,8 @@ public class PriorityQueue<E> extends AbstractQueue<E>
}
/**
* Creates a {@code PriorityQueue} with the default initial capacity
* that orders its elements according to the specified comparator.
* Creates a {@code PriorityQueue} with the default initial capacity and
* whose elements are ordered according to the specified comparator.
*
* @param comparator the comparator that will be used to order this
* priority queue. If {@code null}, the {@linkplain Comparable
......
......@@ -64,6 +64,7 @@ public class RemoveContains {
public int compare(String x, String y) {
return x.charAt(0) - y.charAt(0); }};
test(new PriorityQueue<String>(firstChar));
test(new PriorityQueue<String>(10, firstChar));
test(new PriorityBlockingQueue<String>(10, firstChar));
test(new ArrayBlockingQueue<String>(10));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册