Skip to content

Rust unit tests

cargo test -p daw-engine --lib runs the engine’s unit tests. They need no audio device. They cover, among others: loops and real copies, routing order and loop pruning (model/tests.rs, model/routing_tests.rs); the click’s levels, accent, divisions and delay compensation (dsp/tests.rs); delay line taps and the PDC solver; take folder comping, crossfades and recording plans (takes.rs); fade curves, crossfade gain sums and placement (fades.rs, session/crossfades.rs); automation evaluation and thinning; Channel EQ filters; resampling; transient detection; Standard MIDI Files; bounce trimming, normalizing and 16-bit dither; range edits; autosave and recovery, undo limits and recording placement (session/options.rs); crash-recovery journals, recovering interrupted takes, atomic saves with a backup and falling back from a damaged project.json (session/recovery.rs); repairing the WAV headers a crash leaves, for every format the recorder writes (wav_repair.rs); preferences parsing; the recorder’s bit depths; the tempo map; contain(); preset files and names (presets.rs); parameter normalization and dynamics effects’ gain reduction (dsp/builtin.rs); channel strip settings (copy and paste through JSON, onto audio and instrument tracks, missing plug-ins, Reset, setting files: strip_settings.rs, session/strip_settings.rs); the clip indicators’ peak holds (session/strip_meters.rs); and each built-in effect’s DSP (fx/*.rs: the Limiter’s ceiling and latency, the Reverb’s stability, the Tuner’s accuracy, the Loudness Meter’s BS.1770 weighting and true peak, the Linear Phase EQ’s kernels, and more). The modules added since cover their own pure parts too: region playback parameters (region_params.rs), patterns (pattern.rs), comps and MIDI take folders (takes.rs), the drag modes and Move Automation with Regions (drag_modes.rs, auto_move.rs), the Arrangement track’s and the arranging commands’ time maps (arrangement.rs, arrange_cmds.rs), Strip Silence, VCAs (vca.rs), controller assignments (controllers.rs), and the session modules that apply them (session/*.rs).

cargo test -p daw runs the Tauri crate’s tests (old and partly malformed settings.json files load with defaults).