lgtk-0.2: lens-based GUI with Gtk backend

Safe HaskellNone

Control.MLens.ExtRef.Test

Contents

Description

Tests for the reference implementation of the ExtRef interface.

Synopsis

Basic test environment

(==?) :: (Eq a, Show a, MonadWriter [String] m) => a -> a -> m ()Source

Check an equality.

(==>) :: (Eq a, Show a, MonadWriter [String] m) => Ref m a -> a -> m ()Source

Check the current value of a given reference.

Test suit generation

mkTests :: ((forall i. (MonadWriter [String] (m i), ExtRef (m i)) => m i ()) -> [String]) -> [String]Source

mkTests generates a list of error messages which should be emtpy.

Look inside the sources for the tests.

mkTests' :: (MonadWriter [String] m, ExtRef m) => (m () -> [String]) -> [String]Source

Simplified test generation