referrerpolicy=no-referrer-when-downgrade

Module tests

Module tests 

Source
Expand description

Shared test driver for the virtualization forwarder API.

The cases exercised here only use the public Module / Instance / Execution surface, so they can be invoked from two distinct contexts:

  • Runtime-side, compiled into sc-runtime-test and dispatched through the wasm executor — this exercises the full host-function FFI round-trip.
  • Host-side, invoked as a regular #[test] from sc-virtualization — this exercises the native dispatch path with no wasm involved.

Entry point: run. Tests that need pre-populated externalities (e.g. the storage fallback path of Module::from_storage_key) live as standalone host-only #[test]s in sc-virtualization rather than here.

Enums§

RunResult
The result of running a program to completion.

Constants§

GAS_MAX
Default gas budget used by every test driver.

Functions§

make_handler
The standard syscall handler for the test fixture.
run
Run every test that uses only the public forwarder API.
run_loop
Drives the prepare/run loop calling handler for each syscall.