morley-1.2.0: Developer tools for the Michelson Language
Safe HaskellNone
LanguageHaskell2010

Michelson.Test.Gen

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 (Value' instr 'TTimestamp) Source # 
Instance details

Methods

arbitrary :: Gen (Value' instr 'TTimestamp) #

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

(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 (Value' instr 'TInt) Source # 
Instance details

Methods

arbitrary :: Gen (Value' instr 'TInt) #

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

Arbitrary (Value' instr 'TMutez) Source # 
Instance details

Methods

arbitrary :: Gen (Value' instr 'TMutez) #

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

Arbitrary (Value' instr 'TKeyHash) Source # 
Instance details

Methods

arbitrary :: Gen (Value' instr 'TKeyHash) #

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