INNER CODE UNIT · Go

TestBinaryIterativeSearchEmpty

duke-git/lancet · algorithm/search_empty_test.go:5

func TestBinaryIterativeSearchEmpty(t *testing.T) {
	for _, source := range [][]int{nil, {}} {
		if got := BinaryIterativeSearch(source, 1, 0, 0, &intComparator{}); got != -1 {
			t.Errorf("got %d, want -1", got)
		}
	}
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…