Browse Source

Add info for .data() in priority queue test.

Mikael Capelle 3 years ago
parent
commit
aea8f054d5
1 changed files with 13 additions and 0 deletions
  1. 13
    0
      src/test/org/insa/algo/utils/PriorityQueueTest.java

+ 13
- 0
src/test/org/insa/algo/utils/PriorityQueueTest.java View File

@@ -97,28 +97,41 @@ public abstract class PriorityQueueTest {
97 97
     @Parameters
98 98
     public static Collection<Object> data() {
99 99
         Collection<Object> objects = new ArrayList<>();
100
+
101
+        // Empty queue
100 102
         objects.add(new TestParameters<>(new MutableInteger[0], new int[0]));
103
+
104
+        // Queue with 50 elements from 0 to 49, inserted in order and deleted in order.
101 105
         objects.add(new TestParameters<>(
102 106
                 IntStream.range(0, 50).mapToObj(MutableInteger::new).toArray(MutableInteger[]::new),
103 107
                 IntStream.range(0, 50).toArray()));
108
+
109
+        // Queue with 20 elements from 0 to 19, inserted in order, deleted in the given
110
+        // order.
104 111
         objects.add(new TestParameters<>(
105 112
                 IntStream.range(0, 20).mapToObj(MutableInteger::new).toArray(MutableInteger[]::new),
106 113
                 new int[]{ 12, 17, 18, 19, 4, 5, 3, 2, 0, 9, 10, 16, 8, 14, 13, 15, 7, 6, 1, 11 }));
114
+
115
+        // Queue with 7 elements.
107 116
         objects.add(
108 117
                 new TestParameters<>(
109 118
                         Arrays.stream(new int[]{ 8, 1, 6, 3, 4, 5, 9 })
110 119
                                 .mapToObj(MutableInteger::new).toArray(MutableInteger[]::new),
111 120
                         new int[]{ 6, 5, 0, 1, 4, 2, 3 }));
121
+
122
+        // Queue with 7 elements.
112 123
         objects.add(
113 124
                 new TestParameters<>(
114 125
                         Arrays.stream(new int[]{ 1, 7, 4, 8, 9, 6, 5 })
115 126
                                 .mapToObj(MutableInteger::new).toArray(MutableInteger[]::new),
116 127
                         new int[]{ 2, 0, 1, 3, 4, 5, 6 }));
117 128
 
129
+        // Queue with 13 elements.
118 130
         objects.add(new TestParameters<>(
119 131
                 Arrays.stream(new int[]{ 1, 7, 2, 8, 9, 3, 4, 10, 11, 12, 13, 5, 6 })
120 132
                         .mapToObj(MutableInteger::new).toArray(MutableInteger[]::new),
121 133
                 new int[]{ 3, 4, 0, 2, 5, 6, 1, 7, 8, 9, 10, 11, 12 }));
134
+
122 135
         return objects;
123 136
     }
124 137
 

Loading…
Cancel
Save