Module testing

Source
Expand description

Utilities for writing unit tests

This module contains utilities (types, helper functions and a Rust macro) that make it easier to write unit tests for Texlang primitives. It’s based on the philosophy that high-equality extensive unit tests will be written if and only if writing them is easy.

In general the main tool used in this module is the test_suite Rust macro, which generates a suite of unit tests for a set of primitives.

Macros§

test_suite
Macro to generate a suite of unit tests

Structs§

InMemoryFileSystem
In-memory filesystem for use in unit tests.
ResolvedOptions
State
Simple state type for use in unit tests.

Enums§

SerdeFormat
TestOption
Option passed to a test runner.

Functions§

execute_source_code
Execute source code in a VM with the provided options.
initialize_vm
run_expansion_equality_test
Run an expansion equality test.
run_failure_test
Run a failure test.
run_serde_test
Skip a serialization/deserialization test if the serde feature is off