Module test_helpers

Source
Expand description

This module contains helper functions that are useful for testing both slicec and the compilers that use it. For the test helpers that are specific to slicec (and hence not exported, see: ‘tests/test_helpers.rs’).

Functions§

check_diagnostics
Compares diagnostics emitted by the compiler to an array of expected diagnostics. It ensures that the expected number of diagnostics were emitted (ie: that both lists are the same length).
diagnostics_from_compilation_state
This function is used to get the Diagnostics from a CompilationState.