From 494872343b131e68378844673946b45912874b74 Mon Sep 17 00:00:00 2001 From: Mahmoud Khattab Date: Tue, 24 Apr 2018 03:06:24 -0400 Subject: [PATCH] Fix up --- haskell/Tests/RoundTrip.hs | 2 +- .../t_cauchy_linear_transformation.0.hk | 0 .../t_cauchy_linear_transformation.expected.hk | 4 ++++ .../t_cauchy_linear_transformation.expected.hk | 15 --------------- 4 files changed, 5 insertions(+), 16 deletions(-) rename tests/{RoundTrip2 => RoundTrip}/t_cauchy_linear_transformation.0.hk (100%) create mode 100644 tests/RoundTrip/t_cauchy_linear_transformation.expected.hk delete mode 100644 tests/RoundTrip2/t_cauchy_linear_transformation.expected.hk diff --git a/haskell/Tests/RoundTrip.hs b/haskell/Tests/RoundTrip.hs index cda9e607..a0dfebfc 100644 --- a/haskell/Tests/RoundTrip.hs +++ b/haskell/Tests/RoundTrip.hs @@ -224,7 +224,7 @@ testErlangRelations = test [ testCauchyRelations :: Test testCauchyRelations = test [ - "t_cauchy_linear_transformation" ~: testConcreteFiles "tests/RoundTrip2/t_cauchy_linear_transformation.0.hk" "tests/RoundTrip2/t_cauchy_linear_transformation.expected.hk" + "t_cauchy_linear_transformation" ~: testConcreteFiles "tests/RoundTrip/t_cauchy_linear_transformation.0.hk" "tests/RoundTrip/t_cauchy_linear_transformation.expected.hk" ] testOther :: Test diff --git a/tests/RoundTrip2/t_cauchy_linear_transformation.0.hk b/tests/RoundTrip/t_cauchy_linear_transformation.0.hk similarity index 100% rename from tests/RoundTrip2/t_cauchy_linear_transformation.0.hk rename to tests/RoundTrip/t_cauchy_linear_transformation.0.hk diff --git a/tests/RoundTrip/t_cauchy_linear_transformation.expected.hk b/tests/RoundTrip/t_cauchy_linear_transformation.expected.hk new file mode 100644 index 00000000..071066be --- /dev/null +++ b/tests/RoundTrip/t_cauchy_linear_transformation.expected.hk @@ -0,0 +1,4 @@ +# cauchy(7, 2) +X1 <~ normal(+0/1, 1/1) +X2 <~ normal(+0/1, 1/1) +return (X1 * (+2/1) + X2 * (+7/1)) / X2 \ No newline at end of file diff --git a/tests/RoundTrip2/t_cauchy_linear_transformation.expected.hk b/tests/RoundTrip2/t_cauchy_linear_transformation.expected.hk deleted file mode 100644 index 0b270d52..00000000 --- a/tests/RoundTrip2/t_cauchy_linear_transformation.expected.hk +++ /dev/null @@ -1,15 +0,0 @@ -def stdNormal(): - p <~ normal(0, 1) - return p - -def stdCauchy(): - X1 <~ stdNormal() - X2 <~ stdNormal() - return X1/X2 - -def cauchy(a real, alpha prob): - X <~ stdCauchy() - return a + alpha*X - -X <~ cauchy(7, 2) -return X \ No newline at end of file