Lines Matching refs:search
15 import {search, searchEq, searchRange, searchSegment} from './binary_search';
18 expect(search(Float64Array.of(), 100)).toEqual(-1);
19 expect(search(Float64Array.of(42), 42)).toEqual(0);
20 expect(search(Float64Array.of(42), 43)).toEqual(0);
21 expect(search(Float64Array.of(42), 41)).toEqual(-1);
22 expect(search(Float64Array.of(42, 43), 42)).toEqual(0);
23 expect(search(Float64Array.of(42, 43), 43)).toEqual(1);
24 expect(search(Float64Array.of(42, 43), 44)).toEqual(1);
25 expect(search(Float64Array.of(42, 43, 44), 41)).toEqual(-1);
26 expect(search(Float64Array.of(42, 43, 44), 42)).toEqual(0);
27 expect(search(Float64Array.of(42, 43, 44), 43)).toEqual(1);
28 expect(search(Float64Array.of(42, 43, 44), 44)).toEqual(2);
29 expect(search(Float64Array.of(42, 43, 44), 45)).toEqual(2);