func TestFirstOnlyEmpty(t *testing.T) { stream := functional.NilStream() var value int if output := FirstOnly(stream, emptyError, &value); output != emptyError { t.Errorf("Expected emptyError, got %v", output) } }
func TestPageBufferEmptyLow(t *testing.T) { stream := &closeChecker{ Stream: functional.NilStream()} pb := NewPageBuffer(make([]int, 6), -1) pb.Consume(stream) verifyPageFetched(t, pb, 0, 0, 0, true) }