ouroboros-consensus-test-0.3.1.0: Tests of the consensus layer
Safe HaskellNone
LanguageHaskell2010

Test.Util.Range

Synopsis

Documentation

data Range n Source #

Constructors

R_Eq n 
R_Btwn (n, n) 
R_Gt n 

Instances

Instances details
Eq n ⇒ Eq (Range n) Source # 
Instance details

Defined in Test.Util.Range

Methods

(==)Range n → Range n → Bool Source #

(/=)Range n → Range n → Bool Source #

Show n ⇒ Show (Range n) Source # 
Instance details

Defined in Test.Util.Range

Methods

showsPrecIntRange n → ShowS Source #

showRange n → String Source #

showList ∷ [Range n] → ShowS Source #

data RangeK Source #

Rough indication of the size of a value in relation to k

Useful for labelling tests.

Constructors

Range_Eq_K SecurityParam

The value was equal to K

Range_Just_Below_K SecurityParam Word64

The value was just below to K

We indicate how far off from K it was

Range_Just_Above_K SecurityParam Word64

The value was just above K

We indicate how far off from K it was

Range_Near_Zero SecurityParam Word64

The value was almost zero

If there is a choice between Range_Just_Below_K and Range_Near_Zero, the constructor with the smaller argument should be used.

Range_Less_Than_K SecurityParam Word64

Less than k (but not near k and not near 0)

We round to the neareast multiple of (k / 10)

Range_More_Than_K SecurityParam Word64

More than k (but not near k)

We round to the first power of two above k that is equal to above the value.

Instances

Instances details
Eq RangeK Source # 
Instance details

Defined in Test.Util.Range

Methods

(==)RangeKRangeKBool Source #

(/=)RangeKRangeKBool Source #

Show RangeK Source # 
Instance details

Defined in Test.Util.Range

range ∷ (Ord n, Show n, Num n) ⇒ n → Range n Source #