X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FAssertions.hs;h=4e09b82974f301762dcdefcd0253e50ceeec3459;hb=610d0f0af8a802c26d51231d6e2426a72e40fd2d;hp=b2ec7c15ef70fee0ad4b9c189ce9249b4c33b7f8;hpb=cf2126c163fc1cf26175da1c7200a0ec1e3e034d;p=spline3.git diff --git a/src/Assertions.hs b/src/Assertions.hs index b2ec7c1..4e09b82 100644 --- a/src/Assertions.hs +++ b/src/Assertions.hs @@ -10,7 +10,7 @@ import Test.HUnit (Assertion, assertFailure) import Comparisons ((~=)) -import Point (Point, is_close) + -- | An HUnit assertion that wraps the almost_equals function. Stolen -- from the definition of 'assertEqual' in Test\/HUnit\/Base.hs. @@ -21,14 +21,6 @@ assertAlmostEqual preface expected actual = "expected: " ++ show expected ++ "\n but got: " ++ show actual --- | An HUnit assertion that wraps the is_close function. Stolen --- from the definition of 'assertEqual' in Test\/HUnit\/Base.hs. -assertClose :: String -> Point -> Point -> Assertion -assertClose preface expected actual = - unless (actual `is_close` expected) (assertFailure msg) - where msg = (if null preface then "" else preface ++ "\n") ++ - "expected: " ++ show expected ++ "\n but got: " ++ show actual - -- | It's asinine that this doesn't exist already. assertTrue :: String -> Bool -> Assertion