squiggle/__tests__/Bandwidth__Test.re

13 lines
318 B
ReasonML
Raw Normal View History

2020-04-03 10:25:42 +00:00
open Jest;
open Expect;
describe("Bandwidth", () => {
2020-04-03 11:08:32 +00:00
test("nrd0()", () => {
2020-04-03 10:25:42 +00:00
let data = [|1., 4., 3., 2.|];
2020-04-03 19:41:37 +00:00
expect(Bandwidth.nrd0(data)) |> toEqual(0.7625801874014622);
2020-04-03 10:25:42 +00:00
});
2020-04-03 11:08:32 +00:00
test("nrd()", () => {
2020-04-03 10:25:42 +00:00
let data = [|1., 4., 3., 2.|];
2020-04-03 19:41:37 +00:00
expect(Bandwidth.nrd(data)) |> toEqual(0.8981499984950554);
2020-04-03 10:25:42 +00:00
});
});