Skip to main content

Module test_environment

Module test_environment 

Source
Expand description

The in-process thruput test environment.

Structs§

TestEnvironment
An in-process Thruput instance for testing contracts natively.

Constants§

TEST_NETWORK_NAME
Name of the network that TestEnvironments run on.

Functions§

mock_genesis_root_contract
The genesis root installed by the default constructors: a mock contract whose id sits at the top of the range, away from the low ids tests typically register. The test environment executes contract bodies natively through the mock trampoline, so the genesis root’s code never runs — only its deployment exists. Use TestEnvironment::with_genesis_root_contract to install a different contract (e.g. a real rv32 artifact).
test_network_hash
The NetworkHash that TestEnvironments are created with: sha256(TEST_NETWORK_NAME).

Type Aliases§

TestEnvironmentHandle
Shared handle to a TestEnvironment; returned by its constructors.