From 01b80d73be1834882a11379a20718896f16d2d79 Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Mon, 28 Mar 2022 16:52:04 -0400 Subject: [PATCH] Added simple genericOperation test --- .../GenericDist/GenericOperation__Test.res | 31 +------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/packages/squiggle-lang/__tests__/GenericDist/GenericOperation__Test.res b/packages/squiggle-lang/__tests__/GenericDist/GenericOperation__Test.res index 2c1a44c4..22121903 100644 --- a/packages/squiggle-lang/__tests__/GenericDist/GenericOperation__Test.res +++ b/packages/squiggle-lang/__tests__/GenericDist/GenericOperation__Test.res @@ -62,43 +62,14 @@ describe("toPointSet", () => { expect(result)->toEqual(#Error(Other("Converting sampleSet to pointSet failed"))) }) - test("back and forth", () => { + test("on sample set", () => { let result = run(#fromDist(#toDist(#toPointSet), normalDist)) |> fmap(#fromDist(#toDist(#toSampleSet(1000)))) - |> fmap(#fromDist(#toDist(#consoleLog))) |> fmap(#fromDist(#toDist(#toPointSet))) - |> fmap(#fromDist(#toDist(#consoleLog))) |> fmap(#fromDist(#toFloat(#Mean))) |> toFloat |> toExt expect(result)->toBeCloseTo(5.09) }) - - test("on sample set distribution", () => { - let result = - run( - #fromDist( - #toDist(#toPointSet), - #SampleSet([ - 0.0, - 1.0, - 2.0, - 3.0, - 4.0, - 5.0, - 6.0, - 7.0, - 8.0, - 9.0, - 10.0, - ]), - ), - ) - |> fmap(#fromDist(#toFloat(#Mean))) - |> toFloat - |> toExt - Js.log(result) - expect(result)->toBeCloseTo(5.09) - }) })