Skip to content

Commit c8c415c

Browse files
committed
Fix
1 parent 8f55a76 commit c8c415c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/java/com/thealgorithms/misc/RangeInSortedArrayTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,10 @@ public void testGetCountLessThanWithNoSmallerElements() {
6161
int[] nums = {2, 3, 4, 5};
6262
assertEquals(0, RangeInSortedArray.getCountLessThan(nums, 1), "Count of elements less than 1 should be 0");
6363
}
64+
65+
@Test
66+
public void testGetCountLessThanWithEmptyArray() {
67+
int[] nums = {};
68+
assertEquals(0, RangeInSortedArray.getCountLessThan(nums, 1), "Count of elements less than 1 in an empty array should be 0");
69+
}
6470
}

0 commit comments

Comments
 (0)