Coder Social home page Coder Social logo

purescript-strongcheck's Introduction

Module Documentation

Module Test.StrongCheck

Types

newtype AlphaNumString where
  AlphaNumString :: String -> AlphaNumString

newtype ArbEnum a where
  ArbEnum :: a -> ArbEnum a

newtype Negative where
  Negative :: Number -> Negative

newtype NonZero where
  NonZero :: Number -> NonZero

newtype Positive where
  Positive :: Number -> Positive

type QC a = forall eff. Eff (err :: Exception, random :: Random, trace :: Trace | eff) a

data Result where
  Success :: Result
  Failed :: String -> Result

newtype Signum where
  Signum :: Number -> Signum

Type Classes

class Arbitrary t where
  arbitrary :: Gen t

class CoArbitrary t where
  coarbitrary :: forall r. t -> Gen r -> Gen r

class Testable prop where
  test :: prop -> Gen Result

Type Class Instances

instance arbAlphaNumString :: Arbitrary AlphaNumString

instance arbArbEnum :: (Enum a) => Arbitrary (ArbEnum a)

instance arbArray :: (Arbitrary a) => Arbitrary [a]

instance arbBoolean :: Arbitrary Boolean

instance arbChar :: Arbitrary Char

instance arbEither :: (Arbitrary a, Arbitrary b) => Arbitrary (Either a b)

instance arbFunction :: (CoArbitrary a, Arbitrary b) => Arbitrary (a -> b)

instance arbMaybe :: (Arbitrary a) => Arbitrary (Maybe a)

instance arbNegative :: Arbitrary Negative

instance arbNonZero :: Arbitrary NonZero

instance arbNumber :: Arbitrary Number

instance arbPositive :: Arbitrary Positive

instance arbSignum :: Arbitrary Signum

instance arbString :: Arbitrary String

instance arbTuple :: (Arbitrary a, Arbitrary b) => Arbitrary (Tuple a b)

instance coarbAlphaNumString :: CoArbitrary AlphaNumString

instance coarbArbEnum :: (Enum a) => CoArbitrary (ArbEnum a)

instance coarbArray :: (CoArbitrary a) => CoArbitrary [a]

instance coarbBoolean :: CoArbitrary Boolean

instance coarbChar :: CoArbitrary Char

instance coarbEither :: (CoArbitrary a, CoArbitrary b) => CoArbitrary (Either a b)

instance coarbFunction :: (Arbitrary a, CoArbitrary b) => CoArbitrary (a -> b)

instance coarbMaybe :: (CoArbitrary a) => CoArbitrary (Maybe a)

instance coarbNegative :: CoArbitrary Negative

instance coarbNonZero :: CoArbitrary NonZero

instance coarbNumber :: CoArbitrary Number

instance coarbPositive :: CoArbitrary Positive

instance coarbSignum :: CoArbitrary Signum

instance coarbString :: CoArbitrary String

instance coarbTuple :: (CoArbitrary a, CoArbitrary b) => CoArbitrary (Tuple a b)

instance enumArbEnum :: (Enum a) => Enum (ArbEnum a)

instance eqArbEnum :: (Eq a) => Eq (ArbEnum a)

instance eqResult :: Eq Result

instance monoidResult :: Monoid Result

instance ordArbEnum :: (Ord a) => Ord (ArbEnum a)

instance semigroupResult :: Semigroup Result

instance showArbEnum :: (Show a) => Show (ArbEnum a)

instance showResult :: Show Result

instance testableBoolean :: Testable Boolean

instance testableFunction :: (Arbitrary t, Testable prop) => Testable (t -> prop)

instance testableResult :: Testable Result

Values

(<?>) :: Boolean -> String -> Result

assert :: forall prop. (Testable prop) => prop -> QC Unit

quickCheck :: forall prop. (Testable prop) => prop -> QC Unit

quickCheck' :: forall prop. (Testable prop) => Number -> prop -> QC Unit

quickCheckPure :: forall prop. (Testable prop) => Number -> Seed -> prop -> [Result]

runArbEnum :: forall a. ArbEnum a -> a

smallCheck :: forall prop. (Testable prop) => prop -> QC Unit

smallCheckPure :: forall prop. (Testable prop) => Number -> prop -> [Result]

statCheck :: forall prop. (Testable prop) => Number -> prop -> QC Unit

statCheckPure :: forall prop. (Testable prop) => Seed -> Number -> prop -> Result

purescript-strongcheck's People

Contributors

jdegoes avatar paf31 avatar garyb avatar joneshf avatar

Watchers

Isaac Shapira avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.