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


-- | Tasty helpers to test HsLua.
--   
--   Various tasty helpers and utilities to test HsLua oparations. Built on
--   top of tasty-hunit.
@package tasty-hslua
@version 1.1.1


-- | Utilities for testing of HsLua operations.
module Test.Tasty.HsLua

-- | Checks whether the operation returns <a>True</a>.
assertLuaBool :: HasCallStack => LuaE e Bool -> Assertion

-- | Takes a Lua expression as a <a>ByteString</a>, evaluates it and pushes
--   the result to the stack.
--   
--   <pre>
--   -- will return "12"
--   run $ do
--     pushLuaExpr "7 + 5"
--     tointeger top
--   </pre>
pushLuaExpr :: LuaError e => ByteString -> LuaE e ()

-- | Checks whether a <a>Lua</a> operation fails with the given string as
--   error message.
shouldBeErrorMessageOf :: (HasCallStack, Show a) => String -> Lua a -> Assertion

-- | Takes a value and a <a>Lua</a> operation and turns them into an
--   <a>Assertion</a> which checks that the operation produces the given
--   value.
shouldBeResultOf :: (HasCallStack, Eq a, Show a) => a -> Lua a -> Assertion

-- | Checks whether the return value of an operation holds for the given
--   predicate.
shouldHoldForResultOf :: (HasCallStack, Show a) => (a -> Bool) -> Lua a -> Assertion

-- | Infix alias for <a>testCase</a>.
(=:) :: String -> Assertion -> TestTree
infix 3 =:

-- | Infix alias for <a>luaTestBool</a>.
(?:) :: HasCallStack => String -> LuaE e Bool -> TestTree
infixr 3 ?:
