@@ -238,8 +238,7 @@ void testDirectMutationWithoutChangeKeyDoesNotReheapByDesign() {
238238
239239 @ Test
240240 void testDuplicateEqualsElementsAreSupportedIdentityMap () {
241- IndexedPriorityQueue <NodeWithEquals > pq =
242- new IndexedPriorityQueue <>(Comparator .comparingInt (n -> n .prio ));
241+ IndexedPriorityQueue <NodeWithEquals > pq = new IndexedPriorityQueue <>(Comparator .comparingInt (n -> n .prio ));
243242
244243 NodeWithEquals x1 = new NodeWithEquals ("X1" , 7 );
245244 NodeWithEquals x2 = new NodeWithEquals ("X2" , 7 ); // equals to X1 by prio, but different instance
@@ -322,39 +321,30 @@ void testRemoveHeadAndMiddleAndTail() {
322321
323322 @ Test
324323 void testInvalidInitialCapacityThrows () {
325- Assertions .assertThrows (
326- IllegalArgumentException .class ,
327- () -> new IndexedPriorityQueue <Integer >(0 , Comparator .naturalOrder ()));
324+ Assertions .assertThrows (IllegalArgumentException .class , () -> new IndexedPriorityQueue <Integer >(0 , Comparator .naturalOrder ()));
328325 }
329326
330327 @ Test
331328 void testChangeKeyOnMissingElementThrows () {
332329 IndexedPriorityQueue <Node > pq = newNodePQ ();
333330 Node a = new Node ("A" , 10 );
334331
335- Assertions .assertThrows (
336- IllegalArgumentException .class ,
337- () -> pq .changeKey (a , n -> n .prio = 5 ));
332+ Assertions .assertThrows (IllegalArgumentException .class , () -> pq .changeKey (a , n -> n .prio = 5 ));
338333 }
339334
340335 @ Test
341336 void testDecreaseKeyOnMissingElementThrows () {
342337 IndexedPriorityQueue <Node > pq = newNodePQ ();
343338 Node a = new Node ("A" , 10 );
344339
345- Assertions .assertThrows (
346- IllegalArgumentException .class ,
347- () -> pq .decreaseKey (a , n -> n .prio = 5 ));
340+ Assertions .assertThrows (IllegalArgumentException .class , () -> pq .decreaseKey (a , n -> n .prio = 5 ));
348341 }
349342
350343 @ Test
351344 void testIncreaseKeyOnMissingElementThrows () {
352345 IndexedPriorityQueue <Node > pq = newNodePQ ();
353346 Node a = new Node ("A" , 10 );
354347
355- Assertions .assertThrows (
356- IllegalArgumentException .class ,
357- () -> pq .increaseKey (a , n -> n .prio = 15 ));
348+ Assertions .assertThrows (IllegalArgumentException .class , () -> pq .increaseKey (a , n -> n .prio = 15 ));
358349 }
359-
360350}
0 commit comments