Commits

Aleksey Khudyakov committed 2866bed

Remove non-ASCII character from messages from test suite.

They prevent tests from running on machines with locales
where they couldn't be printed.

(Reported at #42)

Comments (0)

Files changed (1)

tests/Tests/Distribution.hs

 cdfTests :: (Param d, Distribution d, QC.Arbitrary d, Show d) => T d -> [Test]
 cdfTests t =
   [ testProperty "C.D.F. sanity"        $ cdfSanityCheck         t
-  , testProperty "CDF limit at +∞"      $ cdfLimitAtPosInfinity  t
-  , testProperty "CDF limit at -∞"      $ cdfLimitAtNegInfinity  t
-  , testProperty "CDF at +∞ = 1"        $ cdfAtPosInfinity       t
-  , testProperty "CDF at -∞ = 1"        $ cdfAtNegInfinity       t
+  , testProperty "CDF limit at +inf"    $ cdfLimitAtPosInfinity  t
+  , testProperty "CDF limit at -inf"    $ cdfLimitAtNegInfinity  t
+  , testProperty "CDF at +inf = 1"      $ cdfAtPosInfinity       t
+  , testProperty "CDF at -inf = 1"      $ cdfAtNegInfinity       t
   , testProperty "CDF is nondecreasing" $ cdfIsNondecreasing     t
   , testProperty "1-CDF is correct"     $ cdfComplementIsCorrect t
   ]
 -- Check that discrete CDF is correct
 discreteCDFcorrect :: (DiscreteDistr d) => T d -> d -> Int -> Int -> Property
 discreteCDFcorrect _ d a b
-  = printTestCase (printf "CDF = %g" p1)
-  $ printTestCase (printf "Sum = %g" p2)
-  $ printTestCase (printf "Δ   = %g" (abs (p1 - p2)))
+  = printTestCase (printf "CDF   = %g" p1)
+  $ printTestCase (printf "Sum   = %g" p2)
+  $ printTestCase (printf "Delta = %g" (abs (p1 - p2)))
   $ abs (p1 - p2) < 3e-10
   -- Avoid too large differeneces. Otherwise there is to much to sum
   --
   where
     -- Student-T
     testStudentPDF ndf x exact
-      = testAssertion (printf "density (studentT %f) %f  %f" ndf x exact)
+      = testAssertion (printf "density (studentT %f) %f ~ %f" ndf x exact)
       $ eq 1e-5  exact  (density (studentT ndf) x)
     testStudentCDF ndf x exact
-      = testAssertion (printf "cumulative (studentT %f) %f  %f" ndf x exact)
+      = testAssertion (printf "cumulative (studentT %f) %f ~ %f" ndf x exact)
       $ eq 1e-5  exact  (cumulative (studentT ndf) x)
     -- F-distribution
     testFdistrPDF n m x exact
-      = testAssertion (printf "density (fDistribution %i %i) %f  %f [got %f]" n m x exact d)
+      = testAssertion (printf "density (fDistribution %i %i) %f ~ %f [got %f]" n m x exact d)
       $ eq 1e-5  exact d
       where d = density (fDistribution n m) x
     testFdistrCDF n m x exact
-      = testAssertion (printf "cumulative (fDistribution %i %i) %f  %f [got %f]" n m x exact d)
+      = testAssertion (printf "cumulative (fDistribution %i %i) %f ~ %f [got %f]" n m x exact d)
       $ eq 1e-5  exact d
       where d = cumulative (fDistribution n m) x