truce-test
Test harness for truce audio plugins.
Overview
Helpers for offline rendering, assertion, and validation of truce plugins, all in-process with no DAW or host simulation needed. Use this crate in your plugin's integration tests to verify audio output, parameter behavior, state persistence, and editor lifecycle.
Entry points
driver!(MyPlugin)macro returns aPluginDriverbuilder. Configure it (sample rate, block size, MIDI events, parameter overrides, script callbacks) and call.run()to get back aDriverResultwith the rendered audio, output events, and meter readings.screenshot!(MyPlugin)macro returns aScreenshotTestbuilder for golden-image regression tests on the plugin editor.
Assertions
Audio-shape assertions live in truce_test::assertions and take a
&DriverResult<P>:
assert_nonzero,assert_silenceassert_no_nansassert_peak_belowassert_silence_after,assert_nonzero_afterassert_silence_between,assert_nonzero_betweenassert_meter_above,assert_meter_belowassert_output_event_count
Whole-plugin contract assertions live at the crate root and take only a type parameter (the driver is set up internally):
assert_state_round_trip,assert_corrupt_state_no_crash,assert_empty_state_no_crashassert_has_editor,assert_editor_lifecycle,assert_editor_size_consistentassert_param_defaults_match,assert_param_normalized_clamped,assert_param_normalized_roundtrip,assert_param_count_matches,assert_no_duplicate_param_idsassert_valid_info,assert_au_type_codes_ascii,assert_fourcc_roundtripassert_bus_config_effect,assert_bus_config_instrument
Usage
use ;