morley-0.3.0.1: Developer tools for the Michelson Language

Safe HaskellNone
LanguageHaskell2010

Michelson.Test.Gen

Contents

Description

Utilities for arbitrary data generation in property tests.

Synopsis

Documentation

minTimestamp :: Timestamp Source #

Minimal (earliest) timestamp used for Arbitrary (CValue 'CTimestamp)

maxTimestamp :: Timestamp Source #

Maximal (latest) timestamp used for Arbitrary (CValue 'CTimestamp)

midTimestamp :: Timestamp Source #

Median of minTimestamp and maxTimestamp. Useful for testing (exactly half of generated dates will be before and after this date).

Orphan instances

Arbitrary Timestamp Source # 
Instance details

Arbitrary Mutez Source # 
Instance details

Methods

arbitrary :: Gen Mutez #

shrink :: Mutez -> [Mutez] #

Arbitrary (CValue CInt) Source # 
Instance details

Arbitrary (CValue CMutez) Source # 
Instance details

Arbitrary (CValue CKeyHash) Source # 
Instance details

Arbitrary (CValue CTimestamp) Source # 
Instance details

(Arbitrary (Value' instr a), Arbitrary (Value' instr b)) => Arbitrary (Value' instr (TPair a b)) Source # 
Instance details

Methods

arbitrary :: Gen (Value' instr (TPair a b)) #

shrink :: Value' instr (TPair a b) -> [Value' instr (TPair a b)] #

Arbitrary (Value' instr TUnit) Source # 
Instance details

Methods

arbitrary :: Gen (Value' instr TUnit) #

shrink :: Value' instr TUnit -> [Value' instr TUnit] #

Arbitrary (Value' instr a) => Arbitrary (Value' instr (TList a)) Source # 
Instance details

Methods

arbitrary :: Gen (Value' instr (TList a)) #

shrink :: Value' instr (TList a) -> [Value' instr (TList a)] #

Arbitrary (CValue a) => Arbitrary (Value' instr (Tc a)) Source # 
Instance details

Methods

arbitrary :: Gen (Value' instr (Tc a)) #

shrink :: Value' instr (Tc a) -> [Value' instr (Tc a)] #