Step 5 - test

This commit is contained in:
Roman Galochkin 2020-02-21 16:21:43 +03:00
parent f929ccd942
commit 7ed722047f

View File

@ -7,9 +7,20 @@ describe("CDF", () => {
let shape: DistributionTypes.xyShape = let shape: DistributionTypes.xyShape =
CDFunctor.order({xs: [|1., 4., 8.|], ys: [|8., 9., 2.|]}); CDFunctor.order({xs: [|1., 4., 8.|], ys: [|8., 9., 2.|]});
}); });
test("order", () => { test("order#1", () => {
Js.log(CDFunctor.order({xs: [|1., 4., 8.|], ys: [|8., 9., 2.|]})); let a = CDFunctor.order({xs: [|1., 4., 8.|], ys: [|8., 9., 2.|]});
Js.log(CDFunctor.order({xs: [|10., 5., 12.|], ys: [|8., 9., 2.|]})); let b: DistributionTypes.xyShape = {
expect(19.0) |> toEqual(19.0); xs: [|1., 4., 8.|],
ys: [|8., 9., 2.|],
};
expect(a) |> toEqual(b);
});
test("order#2", () => {
let a = CDFunctor.order({xs: [|10., 5., 12.|], ys: [|8., 9., 2.|]});
let b: DistributionTypes.xyShape = {
xs: [|5., 10., 12.|],
ys: [|9., 8., 2.|],
};
expect(a) |> toEqual(b);
}); });
}); });