diff --git a/be-graphes-algos/src/test/java/org/insa/graphs/algorithm/utils/PriorityQueueTest.java b/be-graphes-algos/src/test/java/org/insa/graphs/algorithm/utils/PriorityQueueTest.java index aca7b79..6804650 100644 --- a/be-graphes-algos/src/test/java/org/insa/graphs/algorithm/utils/PriorityQueueTest.java +++ b/be-graphes-algos/src/test/java/org/insa/graphs/algorithm/utils/PriorityQueueTest.java @@ -314,7 +314,14 @@ public abstract class PriorityQueueTest { } @Test - public void testRemoveThenAdd() { + /** + * This test may fail if your algorithm for remove assumes the heap is well-formed + * (i.e. you assume the element to remove is at its right position). + * + * In that case, you can remove this test, but note that remove must always be invoked on a well-formed heap. + * In particular, in your Dijkstra implementation, do not modify an element that is in the heap. + */ + public void ModifyInPlaceThenRemoveThenAdd() { Assume.assumeFalse(queue.isEmpty()); int min = Collections.min(Arrays.asList(parameters.data)).get(); for (MutableInteger mi : parameters.data) {