hevm-0.42.0: Ethereum virtual machine evaluator

Safe HaskellNone
LanguageHaskell2010

EVM.UnitTest

Synopsis

Documentation

initializeUnitTest :: UnitTestOptions -> Stepper () Source #

Assuming a constructor is loaded, this stepper will run the constructor to create the test contract, give it an initial balance, and run `setUp()'.

runUnitTest :: UnitTestOptions -> ABIMethod -> AbiValue -> Stepper Bool Source #

Assuming a test contract is loaded and initialized, this stepper will run the specified test method and return whether it succeeded.

fuzzTest :: UnitTestOptions -> Text -> [AbiType] -> VM -> Property Source #

Randomly generates the calldata arguments and runs the test

tick :: Text -> IO () Source #

data OpLocation Source #

This is like an unresolved source mapping.

Constructors

OpLocation 

Fields

runOne :: UnitTestOptions -> VM -> ABIMethod -> AbiValue -> IO (Text, Either Text Text, VM) Source #

Define the thread spawner for normal test cases

fuzzRun :: UnitTestOptions -> VM -> Text -> [AbiType] -> IO (Text, Either Text Text, VM) Source #

Define the thread spawner for property based tests

maybeM :: Monad m => b -> (a -> b) -> m (Maybe a) -> m b Source #