Currently there is no test for a null
-buffer in the “binary search” exercise.
A test like this would be needed:
test "nothing is found if the array is null" {
try testing.expectError(SearchError.EmptyBuffer, binarySearch(isize, 13, null));
}
Right now, solutions that simply remove the optional part from the solution template work fine, for example this one:
Alternatively, just make the buffer non-optional throughout the exercise.