Expand description
Utilities for running Leo programs in test environments.
Currently this is used by:
- the test runner in
test_execution.rs, - the interpreter tests in
interpreter/src/test_interpreter.rs, and - the
leo testcommand incli/commands/test.rs.
leo-compiler is not necessarily the perfect place for it, but
it’s the easiest place for now to make it accessible to all of these.
Provides functions for:
- Running programs without a ledger (
run_without_ledger). To be used for evaluating non-async code. - Running programs with a full ledger (
run_with_ledger), including setup of VM, blocks, and execution tracking. To be used for executing async code.
Also defines types for program configuration, test cases, and outcomes.
Structs§
- Case
- A particular case to run.
- Config
- Programs and configuration to run.
- Evaluation
Outcome - Outcome of an evaluation-only run (no execution trace, no verification).
- Execution
Outcome - Outcome that includes execution and verification details.
- Outcome
- Shared fields for all outcome types.
- Program
- A program to deploy to the ledger.
Enums§
- Evaluation
Status - Execution
Status - The status of a case that was run.
Functions§
- run_
with_ ledger - Run the functions indicated by
casesfrom the programs inconfig. - run_
without_ ledger - Evaluates a set of cases against some programs without using a ledger.