diff --git a/haskell/Tests/RoundTrip.hs b/haskell/Tests/RoundTrip.hs index aa34117f..8abecd4b 100644 --- a/haskell/Tests/RoundTrip.hs +++ b/haskell/Tests/RoundTrip.hs @@ -217,8 +217,8 @@ testStdChiSqRelations = test [ testCauchyRelations :: Test testCauchyRelations = test [ - "t_cauchy_add_transformation" ~: testConcreteFiles "tests/RoundTrip2/t_cauchy_add_transformation.0.hk" "tests/RoundTrip2/t_cauchy_add_transformation.expected.hk", - "t_cauchy_sub_transformation" ~: testConcreteFiles "tests/RoundTrip2/t_cauchy_sub_transformation.0.hk" "tests/RoundTrip2/t_cauchy_sub_transformation.expected.hk" + "t_cauchy_add_transformation" ~: testConcreteFiles "tests/RoundTrip/t_cauchy_add_transformation.0.hk" "tests/RoundTrip/t_cauchy_add_transformation.expected.hk", + "t_cauchy_sub_transformation" ~: testConcreteFiles "tests/RoundTrip/t_cauchy_sub_transformation.0.hk" "tests/RoundTrip/t_cauchy_sub_transformation.expected.hk" ] testExponentialRelations :: Test @@ -306,7 +306,6 @@ allTests = test , testCauchyRelations , testExponentialRelations , testRayleighRelations - , testCauchyRelations , testOther ] diff --git a/tests/RoundTrip2/t_cauchy_add_transformation.0.hk b/tests/RoundTrip/t_cauchy_add_transformation.0.hk similarity index 100% rename from tests/RoundTrip2/t_cauchy_add_transformation.0.hk rename to tests/RoundTrip/t_cauchy_add_transformation.0.hk diff --git a/tests/RoundTrip/t_cauchy_add_transformation.expected.hk b/tests/RoundTrip/t_cauchy_add_transformation.expected.hk new file mode 100644 index 00000000..19b38c4b --- /dev/null +++ b/tests/RoundTrip/t_cauchy_add_transformation.expected.hk @@ -0,0 +1,4 @@ +# cauchy(4, 6) +X1 <~ normal(+0/1, 1/1) +X2 <~ normal(+0/1, 1/1) +return (X2 * (+2/1) + X1 * (+3/1)) / X2 * (+2/1) \ No newline at end of file diff --git a/tests/RoundTrip2/t_cauchy_sub_transformation.0.hk b/tests/RoundTrip/t_cauchy_sub_transformation.0.hk similarity index 100% rename from tests/RoundTrip2/t_cauchy_sub_transformation.0.hk rename to tests/RoundTrip/t_cauchy_sub_transformation.0.hk diff --git a/tests/RoundTrip/t_cauchy_sub_transformation.expected.hk b/tests/RoundTrip/t_cauchy_sub_transformation.expected.hk new file mode 100644 index 00000000..080ee12d --- /dev/null +++ b/tests/RoundTrip/t_cauchy_sub_transformation.expected.hk @@ -0,0 +1,4 @@ +# cauchy(-2, 6) +X1 <~ normal(+0/1, 1/1) +X2 <~ normal(+0/1, 1/1) +return (X2 * (-1/1) + X1 * (+3/1)) / X2 * (+2/1) \ No newline at end of file diff --git a/tests/RoundTrip2/t_cauchy_add_transformation.expected.hk b/tests/RoundTrip2/t_cauchy_add_transformation.expected.hk deleted file mode 100644 index c6654445..00000000 --- a/tests/RoundTrip2/t_cauchy_add_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(4, 6) -return X \ No newline at end of file diff --git a/tests/RoundTrip2/t_cauchy_sub_transformation.expected.hk b/tests/RoundTrip2/t_cauchy_sub_transformation.expected.hk deleted file mode 100644 index ab4b87e1..00000000 --- a/tests/RoundTrip2/t_cauchy_sub_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(-2, 6) -return X \ No newline at end of file