Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data UnitTestOptions s = UnitTestOptions {
- rpcInfo :: RpcInfo
- solvers :: SolverGroup
- verbose :: Maybe Int
- maxIter :: Maybe Integer
- askSmtIters :: Integer
- smtTimeout :: Maybe Natural
- solver :: Maybe Text
- match :: Text
- dapp :: DappInfo
- testParams :: TestVMParams
- ffiAllowed :: Bool
- data TestVMParams = TestVMParams {}
- defaultGasForCreating :: Word64
- defaultGasForInvoking :: Word64
- defaultBalanceForTestContract :: W256
- defaultMaxCodeSize :: W256
- type ABIMethod = Text
- makeVeriOpts :: UnitTestOptions s -> VeriOpts
- unitTest :: App m => UnitTestOptions RealWorld -> Contracts -> m Bool
- initializeUnitTest :: UnitTestOptions s -> SolcContract -> Stepper Concrete s ()
- runUnitTestContract :: App m => UnitTestOptions RealWorld -> Map Text SolcContract -> (Text, [Sig]) -> m [Bool]
- symRun :: App m => UnitTestOptions RealWorld -> VM Concrete RealWorld -> Sig -> m (Text, Either Text Text)
- allBranchRev :: Text -> Text
- symFailure :: UnitTestOptions RealWorld -> Text -> Expr Buf -> [AbiType] -> [(Expr End, SMTCex)] -> Text
- execSymTest :: UnitTestOptions RealWorld -> ABIMethod -> (Expr Buf, [Prop]) -> Stepper Symbolic RealWorld (Expr End)
- checkSymFailures :: VMOps t => UnitTestOptions RealWorld -> Stepper t RealWorld (VM t RealWorld)
- indentLines :: Int -> Text -> Text
- passOutput :: VM t s -> UnitTestOptions s -> Text -> Text
- failOutput :: VM t s -> UnitTestOptions s -> Text -> Text
- formatTestLogs :: (?context :: DappContext) => Map W256 Event -> [Expr Log] -> Text
- formatTestLog :: (?context :: DappContext) => Map W256 Event -> Expr Log -> Maybe Text
- abiCall :: VMOps t => TestVMParams -> Either (Text, AbiValue) ByteString -> EVM t s ()
- makeTxCall :: VMOps t => TestVMParams -> (Expr Buf, [Prop]) -> EVM t s ()
- initialUnitTestVm :: VMOps t => UnitTestOptions s -> SolcContract -> ST s (VM t s)
- paramsFromRpc :: RpcInfo -> IO TestVMParams
- tick :: Text -> IO ()
Documentation
data UnitTestOptions s Source #
UnitTestOptions | |
|
data TestVMParams Source #
TestVMParams | |
|
makeVeriOpts :: UnitTestOptions s -> VeriOpts Source #
Generate VeriOpts from UnitTestOptions
unitTest :: App m => UnitTestOptions RealWorld -> Contracts -> m Bool Source #
Top level CLI endpoint for hevm test
initializeUnitTest :: UnitTestOptions s -> SolcContract -> Stepper Concrete s () 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()'.
runUnitTestContract :: App m => UnitTestOptions RealWorld -> Map Text SolcContract -> (Text, [Sig]) -> m [Bool] Source #
symRun :: App m => UnitTestOptions RealWorld -> VM Concrete RealWorld -> Sig -> m (Text, Either Text Text) Source #
Define the thread spawner for symbolic tests
allBranchRev :: Text -> Text Source #
symFailure :: UnitTestOptions RealWorld -> Text -> Expr Buf -> [AbiType] -> [(Expr End, SMTCex)] -> Text Source #
execSymTest :: UnitTestOptions RealWorld -> ABIMethod -> (Expr Buf, [Prop]) -> Stepper Symbolic RealWorld (Expr End) Source #
checkSymFailures :: VMOps t => UnitTestOptions RealWorld -> Stepper t RealWorld (VM t RealWorld) Source #
passOutput :: VM t s -> UnitTestOptions s -> Text -> Text Source #
failOutput :: VM t s -> UnitTestOptions s -> Text -> Text Source #
formatTestLogs :: (?context :: DappContext) => Map W256 Event -> [Expr Log] -> Text Source #
abiCall :: VMOps t => TestVMParams -> Either (Text, AbiValue) ByteString -> EVM t s () Source #
makeTxCall :: VMOps t => TestVMParams -> (Expr Buf, [Prop]) -> EVM t s () Source #
initialUnitTestVm :: VMOps t => UnitTestOptions s -> SolcContract -> ST s (VM t s) Source #
paramsFromRpc :: RpcInfo -> IO TestVMParams Source #