math-programming-tests-0.5.1: Utility functions for testing implementations of the math-programming library.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Math.Programming.Tests.Fuzz

Description

Fuzz testing for math programming backends.

Synopsis

Documentation

newtype Variable Source #

Constructors

Variable Int 

Instances

Instances details
Show Variable Source # 
Instance details

Defined in Math.Programming.Tests.Fuzz

Eq Variable Source # 
Instance details

Defined in Math.Programming.Tests.Fuzz

Ord Variable Source # 
Instance details

Defined in Math.Programming.Tests.Fuzz

newtype LPActions Source #

Constructors

LPActions [LPAction] 

Instances

Instances details
Arbitrary LPActions Source # 
Instance details

Defined in Math.Programming.Tests.Fuzz

Show LPActions Source # 
Instance details

Defined in Math.Programming.Tests.Fuzz

variables :: forall v c o v. Lens (LPState v c o) (LPState v c o) (Map Variable v) (Map Variable v) Source #

variableNames :: forall v c o. Lens' (LPState v c o) (Map Variable Text) Source #

randomGen :: forall v c o. Lens' (LPState v c o) (IOGenM StdGen) Source #

pending :: forall v c o. Lens' (LPState v c o) [LPAction] Source #

objectives :: forall v c o o. Lens (LPState v c o) (LPState v c o) (Map Objective o) (Map Objective o) Source #

objectiveNames :: forall v c o. Lens' (LPState v c o) (Map Objective Text) Source #

constraints :: forall v c o c. Lens (LPState v c o) (LPState v c o) (Map Constraint c) (Map Constraint c) Source #

constraintNames :: forall v c o. Lens' (LPState v c o) (Map Constraint Text) Source #

type LPFuzz v c o m = (MonadState (LPState v c o) m, MonadLP v c o m, MonadWriter (Seq String) m, MonadIO m) Source #

evalPending :: LPFuzz v c o m => m () Source #

evalAction :: LPFuzz v c o m => LPAction -> m () Source #

evalAction' :: LPFuzz v c o m => LPAction -> m () Source #

add :: (LPFuzz v c o m, Ord k) => k -> m a -> ASetter' (LPState v c o) (Map k a) -> m () Source #

addThenRemove :: (LPFuzz v c o m, Ord k) => k -> m a -> (a -> m ()) -> Lens' (LPState v c o) (Map k a) -> m () Source #

makeConstraint :: LPFuzz v c o m => m c Source #

chooseExpr :: LPFuzz v c o m => m (Expr v) Source #

chooseInequality :: LPFuzz v c o m => m (Expr v -> Expr v -> m c) Source #

makeObjective :: LPFuzz v c o m => m o Source #

makeFuzzTests Source #

Arguments

:: (MonadIO m, MonadLP v c o m) 
=> (m (Seq String) -> IO ())

The runner for the API being tested.

-> Spec

The resulting test suite.