Skip to main content

Module tests

Module tests 

Source
Available on crate features __fuzzing only.
Expand description

Internal tests and testing utilities. Not public API.

Modulesยง

arith ๐Ÿ”’
bitwise ๐Ÿ”’
call_gas ๐Ÿ”’
calldata ๐Ÿ”’
cmp ๐Ÿ”’
code ๐Ÿ”’
codecopy_fix ๐Ÿ”’
control_flow ๐Ÿ”’
dedup ๐Ÿ”’
env ๐Ÿ”’
extcode ๐Ÿ”’
fibonacci ๐Ÿ”’
host ๐Ÿ”’
i256_lanes ๐Ÿ”’
macros ๐Ÿ”’
memory ๐Ÿ”’
meta ๐Ÿ”’
regressions ๐Ÿ”’
resume ๐Ÿ”’
resume_at_call ๐Ÿ”’
ret ๐Ÿ”’
returndata ๐Ÿ”’
runner ๐Ÿ”’
spec_id ๐Ÿ”’
stack ๐Ÿ”’
system ๐Ÿ”’

Structsยง

DefBlock
DefCfg
DefEnv
Default test environment struct for test expected values.
DefTx
TestCase
TestHost
Test host that implements [Host] trait for testing.

Constantsยง

ACTION_WHAT_INTERPRETER_SAYS
DEF_ADDR
Default code address.
DEF_BN
DEF_CALLER
DEF_GAS_LIMIT
DEF_GAS_LIMIT_U256
DEF_SPEC
DEF_VALUE
GAS_WHAT_INTERPRETER_SAYS
I256_MAX ๐Ÿ”’
I256_MIN ๐Ÿ”’
MEMORY_WHAT_INTERPRETER_SAYS
OTHER_ADDR
RETURN_WHAT_INTERPRETER_SAYS
STACK_WHAT_INTERPRETER_SAYS

Staticsยง

DEF_CD
DEF_CODEMAP
DEF_DATA
DEF_OPINFOS
DEF_RD
DEF_STORAGE

Functionsยง

asm ๐Ÿ”’
bytecode_binop ๐Ÿ”’
bytecode_binop_mixed ๐Ÿ”’
bytecode_ternop ๐Ÿ”’
bytecode_ternop_mixed ๐Ÿ”’
bytecode_unop ๐Ÿ”’
bytecode_unop_opaque ๐Ÿ”’
Build opaque unop bytecode: MSTORE(a, 0), MLOAD(0), <op>.
def_codemap
def_env
Returns the default test environment.
def_storage
init_tracing
Initializes tracing_subscriber for tests. Safe to call multiple times.
insert_call_outcome_test
Insert a call outcome into the interpreter state (for testing call_with_interpreter).
keccak256_cost ๐Ÿ”’
KECCAK256 opcode gas cost (base + dynamic).
log_cost ๐Ÿ”’
LOG opcode gas cost (base + topics + dynamic).
memory_gas_cost
Memory gas calculation: num_words * 3 + num_words**2 / 512.
push_const_or_load ๐Ÿ”’
run_test_case
set_test_dump
store_dynamic_operands ๐Ÿ”’
verylowcopy_cost ๐Ÿ”’
CALLDATACOPY, CODECOPY, RETURNDATACOPY opcode gas cost (base + dynamic).
with_evm_context
with_jit_compilerllvm