Module Pbt.Properties
val associative : ('a -> 'a -> 'a) -> 'a -> 'a -> 'a -> bool
associative f x y z
test associativity law
val neutral_left : ('a -> 'a -> 'a) -> 'a -> 'a -> bool
neutral_left f elt x
test if elt is neutral on left
val neutral_right : ('a -> 'a -> 'a) -> 'a -> 'a -> bool
neutral_right f elt x
test if elt is neutral on right
val neutrals : ('a -> 'a -> 'a) -> 'a -> 'a -> bool
neutrals f elt x
test if elt is neutral on both side
val capped_left : ('a -> 'a -> 'a) -> 'a -> 'a -> bool
capped_left f cap x
test if the function stays capped when the left argument is capped.
val capped_right : ('a -> 'a -> 'a) -> 'a -> 'a -> bool
capped_right f cap x
test if the function stays capped when the right argument is capped.
val capped : ('a -> 'a -> 'a) -> 'a -> 'a -> bool
capped_right f cap x
test if the function stays capped when the right or left argument is capped.
val oracle : ('a -> 'a -> 'a) -> ('a -> 'a -> 'a) -> 'a -> 'a -> bool
oracle f oracle x y
test if the result between f and the oracle are equals
val absorb_left : ('a -> 'a -> 'a) -> 'a -> 'a -> bool
absorb_left f absorb x
test if the function returns x when the left argument is absorb.
val absorb_right : ('a -> 'a -> 'a) -> 'a -> 'a -> bool
absorb_right f absorb x
test if the function returns x when the right argument is absorb.
val absorbs : ('a -> 'a -> 'a) -> 'a -> 'a -> bool
absorb_right f absorb x
test if the function returns x when the right or left argument is absorb.
val floored_left : ('a -> 'a -> 'a) -> 'a -> 'a -> bool
floored_left f floor x y
test if the function stays floored when the left argument is floored.
val floored_right : ('a -> 'a -> 'a) -> 'a -> 'a -> bool
floored_right f floor x y
test if the function stays floored when the right argument is floored.
val floored : ('a -> 'a -> 'a) -> 'a -> 'a -> bool
floored_right f floor x y
test if the function stays floored when the right or left argument is floored.
val roundtrip_data_encoding : 't Data_encoding.encoding -> 't -> bool
roundtrip_data_encoding encoding x
test the roundtrip property on data_encodinglet encoded_x = Data_encoding.Json.construct encoding x in let decoded_x = Data_encoding.Json.destruct encoding encoded_x in decoded_x = x
val from_string : ?loc:Ppxlib.location -> string -> Ppxlib.expression
Creates expression from a property identifier
If the string belongs to this module properties, it will create an expression like: from_string id -> Pbt.Properties.id
Otherwise, local_gen is required from_string id -> id
val nb_of_gens : string -> int option
Returns the number of generators needed for this module properties