Skip to content

Commit 1b91cef

Browse files
authored
Update PriorityQueueSortTest.java
1 parent b88179c commit 1b91cef

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/test/java/com/thealgorithms/sorts/PriorityQueueSortTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@
55

66
class PriorityQueueSortTest {
77

8+
@Test
9+
void testNullArray() {
10+
int[] input = null;
11+
assertArrayEquals(null, PriorityQueueSort.sort(input));
12+
}
13+
14+
@Test
15+
void testSingleElementArray() {
16+
int[] input = {5};
17+
int[] expected = {5};
18+
assertArrayEquals(expected, PriorityQueueSort.sort(input));
19+
}
20+
821
@Test
922
void testSortNormalArray() {
1023
int[] input = {7, 2, 9, 4, 1};

0 commit comments

Comments
 (0)