hevm-0.46.0: Ethereum virtual machine evaluator
Safe HaskellNone
LanguageHaskell2010

EVM.UnitTest

Synopsis

Documentation

initializeUnitTest :: UnitTestOptions -> SolcContract -> 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

Instances

Instances details
Eq OpLocation Source # 
Instance details

Defined in EVM.UnitTest

Ord OpLocation Source # 
Instance details

Defined in EVM.UnitTest

Show OpLocation Source # 
Instance details

Defined in EVM.UnitTest

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

symRun :: UnitTestOptions -> VM -> Text -> [AbiType] -> Query (Text, Either Text Text, VM) Source #

Define the thread spawner for symbolic tests TODO: return a list of VM's

symbolify :: VM -> VM Source #

takes a concrete VM and makes all storage symbolic