squiggle/__tests__/Foo/Foo__Test.re

26 lines
552 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.|],
};
open Shape;
describe("Shape", () =>
2020-02-18 19:01:11 +00:00
describe("XYShape", () =>
test("#ySum", ()
=>
expect(XYShape.ySum(shape)) |> toEqual(19.0)
)
// test("#both", () => {
// let expected: DistributionTypes.xyShape = {
// xs: [|1., 4., 8.|],
// ys: [|8., 1., 1.|],
// };
// expect(shape |> XYShape.derivative |> XYShape.integral)
// |> toEqual(shape);
// });
)
2020-02-18 15:50:36 +00:00
);