FindY tests

This commit is contained in:
Roman Galochkin 2020-02-25 11:45:44 +03:00
parent efe3c67a25
commit 80a52a2a7b

View File

@ -54,4 +54,18 @@ describe("CDF", () => {
});
expect(Dist.maxX()) |> toEqual(20.);
});
test("findY#1", () => {
module Dist =
CDF.Make({
let shape = CDF.order({xs: [|1., 2., 3.|], ys: [|5., 6., 7.|]});
});
expect(Dist.findY(1.)) |> toEqual(5.);
});
test("findY#2", () => {
module Dist =
CDF.Make({
let shape = CDF.order({xs: [|1., 2., 3.|], ys: [|5., 6., 7.|]});
});
expect(Dist.findY(1.5)) |> toEqual(5.5);
});
});