-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Approximate equality for floating point numbers with HUnit
--   
--   This package exports combinators useful in comparing floating-point
--   numbers in HUnit tests, by using approximate equality.
@package HUnit-approx
@version 1.1.1.1


-- | This module exports combinators to allow approximate equality of
--   floating-point values in HUnit tests.
module Test.HUnit.Approx

-- | Asserts that the specified actual value is approximately equal to the
--   expected value. The output message will contain the prefix, the
--   expected value, the actual value, and the maximum margin of error.
--   
--   If the prefix is the empty string (i.e., <tt>""</tt>), then the prefix
--   is omitted and only the expected and actual values are output.
assertApproxEqual :: (HasCallStack, Ord a, Num a, Show a) => String -> a -> a -> a -> Assertion

-- | Asserts that the specified actual value is approximately equal to the
--   expected value (with the expected value on the left-hand side). The
--   margin of error is specified with the implicit parameter
--   <tt>epsilon</tt>.
(@~?) :: (HasCallStack, Ord a, Num a, Show a, ?epsilon :: a) => a -> a -> Assertion
infix 1 @~?

-- | Asserts that the specified actual value is approximately equal to the
--   expected value (with the expected value on the right-hand side). The
--   margin of error is specified with the implicit parameter
--   <tt>epsilon</tt>.
(@?~) :: (HasCallStack, Ord a, Num a, Show a, ?epsilon :: a) => a -> a -> Assertion
infix 1 @?~

-- | Shorthand for a test case that asserts approximate equality (with the
--   expected value on the left-hand side, and the actual value on the
--   right-hand side).
(~~?) :: (HasCallStack, Ord a, Num a, Show a, ?epsilon :: a) => a -> a -> Test
infix 1 ~~?

-- | Shorthand for a test case that asserts approximate equality (with the
--   actual value on the left-hand side, and the expected value on the
--   right-hand side).
(~?~) :: (HasCallStack, Ord a, Num a, Show a, ?epsilon :: a) => a -> a -> Test
infix 1 ~?~
