"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const seg_index_search_1 = require("./seg-index-search");
test("Segment T search", () => {
    expect((0, seg_index_search_1.segTSearch)([0, 0.5], 0)).toBe(0);
    expect((0, seg_index_search_1.segTSearch)([0, 0.5], 0.25)).toBe(0);
    expect((0, seg_index_search_1.segTSearch)([0, 0.5], 0.5)).toBe(1);
    expect((0, seg_index_search_1.segTSearch)([0, 0.5], 1)).toBe(1);
});
test("Segment T search 2", () => {
    expect((0, seg_index_search_1.segTSearch)([0, 1, 2, 3], -0.1)).toBe(0);
    expect((0, seg_index_search_1.segTSearch)([0, 1, 2, 3], 0)).toBe(0);
    expect((0, seg_index_search_1.segTSearch)([0, 1, 2, 3], 1)).toBe(1);
    expect((0, seg_index_search_1.segTSearch)([0, 1, 2, 3], 2)).toBe(2);
    expect((0, seg_index_search_1.segTSearch)([0, 1, 2, 3], 3)).toBe(3);
    expect((0, seg_index_search_1.segTSearch)([0, 1, 2, 3], 0.5)).toBe(0);
    expect((0, seg_index_search_1.segTSearch)([0, 1, 2, 3], 1.99)).toBe(1);
});
