From aea8f054d55f798a4a9060596190dc71285f84b4 Mon Sep 17 00:00:00 2001 From: Mikael Capelle Date: Thu, 29 Mar 2018 12:18:32 +0200 Subject: [PATCH] Add info for .data() in priority queue test. --- src/test/org/insa/algo/utils/PriorityQueueTest.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/test/org/insa/algo/utils/PriorityQueueTest.java b/src/test/org/insa/algo/utils/PriorityQueueTest.java index e7d111a..909c957 100644 --- a/src/test/org/insa/algo/utils/PriorityQueueTest.java +++ b/src/test/org/insa/algo/utils/PriorityQueueTest.java @@ -97,28 +97,41 @@ public abstract class PriorityQueueTest { @Parameters public static Collection data() { Collection objects = new ArrayList<>(); + + // Empty queue objects.add(new TestParameters<>(new MutableInteger[0], new int[0])); + + // Queue with 50 elements from 0 to 49, inserted in order and deleted in order. objects.add(new TestParameters<>( IntStream.range(0, 50).mapToObj(MutableInteger::new).toArray(MutableInteger[]::new), IntStream.range(0, 50).toArray())); + + // Queue with 20 elements from 0 to 19, inserted in order, deleted in the given + // order. objects.add(new TestParameters<>( IntStream.range(0, 20).mapToObj(MutableInteger::new).toArray(MutableInteger[]::new), new int[]{ 12, 17, 18, 19, 4, 5, 3, 2, 0, 9, 10, 16, 8, 14, 13, 15, 7, 6, 1, 11 })); + + // Queue with 7 elements. objects.add( new TestParameters<>( Arrays.stream(new int[]{ 8, 1, 6, 3, 4, 5, 9 }) .mapToObj(MutableInteger::new).toArray(MutableInteger[]::new), new int[]{ 6, 5, 0, 1, 4, 2, 3 })); + + // Queue with 7 elements. objects.add( new TestParameters<>( Arrays.stream(new int[]{ 1, 7, 4, 8, 9, 6, 5 }) .mapToObj(MutableInteger::new).toArray(MutableInteger[]::new), new int[]{ 2, 0, 1, 3, 4, 5, 6 })); + // Queue with 13 elements. objects.add(new TestParameters<>( Arrays.stream(new int[]{ 1, 7, 2, 8, 9, 3, 4, 10, 11, 12, 13, 5, 6 }) .mapToObj(MutableInteger::new).toArray(MutableInteger[]::new), new int[]{ 3, 4, 0, 2, 5, 6, 1, 7, 8, 9, 10, 11, 12 })); + return objects; }