Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data UnitTestOptions s = UnitTestOptions {
- rpcInfo :: RpcInfo
- solvers :: SolverGroup
- verbose :: Maybe Int
- maxIter :: Maybe Integer
- askSmtIters :: Integer
- smtDebug :: Bool
- 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 :: UnitTestOptions RealWorld -> Contracts -> IO Bool
- initializeUnitTest :: UnitTestOptions s -> SolcContract -> Stepper s ()
- runUnitTestContract :: UnitTestOptions RealWorld -> Map Text SolcContract -> (Text, [Sig]) -> IO [Bool]
- symRun :: UnitTestOptions RealWorld -> VM RealWorld -> Sig -> IO (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 RealWorld (Expr End)
- checkSymFailures :: UnitTestOptions RealWorld -> Stepper RealWorld (VM RealWorld)
- indentLines :: Int -> Text -> Text
- passOutput :: VM s -> UnitTestOptions s -> Text -> Text
- failOutput :: VM 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 :: TestVMParams -> Either (Text, AbiValue) ByteString -> EVM s ()
- makeTxCall :: TestVMParams -> (Expr Buf, [Prop]) -> EVM s ()
- initialUnitTestVm :: UnitTestOptions s -> SolcContract -> ST s (VM 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 :: UnitTestOptions RealWorld -> Contracts -> IO Bool Source #
Top level CLI endpoint for hevm test
initializeUnitTest :: UnitTestOptions s -> SolcContract -> Stepper 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 :: UnitTestOptions RealWorld -> Map Text SolcContract -> (Text, [Sig]) -> IO [Bool] Source #
symRun :: UnitTestOptions RealWorld -> VM RealWorld -> Sig -> IO (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 RealWorld (Expr End) Source #
passOutput :: VM s -> UnitTestOptions s -> Text -> Text Source #
failOutput :: VM s -> UnitTestOptions s -> Text -> Text Source #
formatTestLogs :: (?context :: DappContext) => Map W256 Event -> [Expr Log] -> Text Source #
abiCall :: TestVMParams -> Either (Text, AbiValue) ByteString -> EVM s () Source #
makeTxCall :: TestVMParams -> (Expr Buf, [Prop]) -> EVM s () Source #
initialUnitTestVm :: UnitTestOptions s -> SolcContract -> ST s (VM s) Source #
paramsFromRpc :: RpcInfo -> IO TestVMParams Source #