squiggle/__tests__/Foo/Foo__Test.re

25 lines
448 B
ReasonML
Raw Normal View History

2020-02-18 15:50:36 +00:00
open Jest;
open Expect;
let shape: DistributionTypes.xyShape = {
xs: [|1., 4., 8.|],
ys: [|8., 9., 2.|],
};
let step: DistributionTypes.xyShape = {
xs: [|1., 4., 8.|],
ys: [|8., 17., 19.|],
};
2020-02-18 15:50:36 +00:00
open Shape;
describe("Shape", () =>
describe("XYShape", () => {
test("#ySum", () =>
expect(XYShape.ySum(shape)) |> toEqual(19.0)
);
test("#yFOo", () =>
expect(Discrete.integrate(shape)) |> toEqual(step)
);
})
2020-02-18 15:50:36 +00:00
);