nano-ui
Safe HaskellNone
LanguageGHC2024

NanoUI.Testing.Assert

Description

Assertion and frame helpers for the integration test suite.

Assertions count failures in a shared IORef instead of aborting, so one test reports every broken expectation. Each failure prints the caller's source location and, where there are any, the compared values.

Documentation

bump :: IORef Int -> IO () Source #

assertEq :: (HasCallStack, Eq a, Show a) => IORef Int -> a -> a -> IO () Source #

assertGt :: (HasCallStack, Ord a, Show a) => IORef Int -> a -> a -> IO () Source #

assertLt :: (HasCallStack, Ord a, Show a) => IORef Int -> a -> a -> IO () Source #

evalUi :: Context -> Input -> NanoUI a -> IO a Source #

runClickReduce :: (Typeable msg, Eq model) => (msg -> model -> model) -> Context -> Input -> model -> (model -> NanoUI Response) -> V2 -> IO (model, [msg], Bool) Source #