2022-02-06 23:12:37 +00:00
|
|
|
open Jest
|
|
|
|
open Expect
|
|
|
|
/*
|
2020-11-12 18:48:36 +00:00
|
|
|
let makeTest = (~only=false, str, item1, item2) =>
|
|
|
|
only
|
|
|
|
? Only.test(str, () =>
|
|
|
|
expect(item1) |> toEqual(item2)
|
|
|
|
)
|
|
|
|
: test(str, () =>
|
|
|
|
expect(item1) |> toEqual(item2)
|
|
|
|
);
|
|
|
|
|
|
|
|
let evalParams: ExpressionTypes.ExpressionTree.evaluationParams = {
|
|
|
|
samplingInputs: {
|
|
|
|
sampleCount: 1000,
|
|
|
|
outputXYPoints: 10000,
|
|
|
|
kernelWidth: None,
|
|
|
|
shapeLength: 1000,
|
|
|
|
},
|
|
|
|
environment:
|
|
|
|
[|
|
|
|
|
("K", `SymbolicDist(`Float(1000.0))),
|
|
|
|
("M", `SymbolicDist(`Float(1000000.0))),
|
|
|
|
("B", `SymbolicDist(`Float(1000000000.0))),
|
|
|
|
("T", `SymbolicDist(`Float(1000000000000.0))),
|
|
|
|
|]
|
|
|
|
->Belt.Map.String.fromArray,
|
|
|
|
evaluateNode: ExpressionTreeEvaluator.toLeaf,
|
|
|
|
};
|
|
|
|
|
2022-02-15 20:47:33 +00:00
|
|
|
let shape1: PointSetTypes.xyShape = {xs: [|1., 4., 8.|], ys: [|0.2, 0.4, 0.8|]};
|
2020-11-12 18:48:36 +00:00
|
|
|
|
|
|
|
describe("XYShapes", () => {
|
|
|
|
describe("logScorePoint", () => {
|
|
|
|
makeTest(
|
|
|
|
"When identical",
|
|
|
|
{
|
|
|
|
let foo =
|
|
|
|
HardcodedFunctions.(
|
|
|
|
makeRenderedDistFloat("scaleMultiply", (dist, float) =>
|
|
|
|
verticalScaling(`Multiply, dist, float)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
TypeSystem.Function.T.run(
|
|
|
|
evalParams,
|
|
|
|
[|
|
|
|
|
`SymbolicDist(`Float(100.0)),
|
|
|
|
`SymbolicDist(`Float(1.0)),
|
|
|
|
|],
|
|
|
|
foo,
|
|
|
|
);
|
|
|
|
},
|
|
|
|
Error("Sad"),
|
|
|
|
)
|
|
|
|
})
|
2022-01-29 22:43:08 +00:00
|
|
|
}); */
|