# | Line 173 | Line 173 | public class PriorityQueueTest extends J | |
---|---|---|
173 | } | |
174 | ||
175 | /** | |
176 | + | * add(null) throws NPE |
177 | + | */ |
178 | + | public void testAddNull() { |
179 | + | try { |
180 | + | PriorityQueue q = new PriorityQueue(1); |
181 | + | q.add(null); |
182 | + | shouldThrow(); |
183 | + | } catch (NullPointerException success) { } |
184 | + | } |
185 | + | |
186 | + | /** |
187 | * Offer of comparable element succeeds | |
188 | */ | |
189 | public void testOffer() { |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |