morley-1.0.0: Developer tools for the Michelson Language

Safe HaskellNone
LanguageHaskell2010

Michelson.Test.Util

Description

Testing utility functions used by testing framework itself or intended to be used by test writers.

Synopsis

Documentation

failedProp :: Text -> Property Source #

A Property that always failes with given message.

succeededProp :: Property Source #

A Property that always succeeds.

qcIsLeft :: Show b => Either a b -> Property Source #

The Property holds on `Left a`.

qcIsRight :: Show a => Either a b -> Property Source #

The Property holds on `Right b`.

roundtripTest :: forall x y err. (Show x, Show err, Typeable x, Arbitrary x, Eq x, Eq err) => (x -> y) -> (y -> Either err x) -> TestTree Source #

This TestTree contains a property based test for conversion from some x to some y and back to x (it should successfully return the initial x).