GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • danzig
  • Architecture
  • Getting Started
  • Parameters
  • Audio Helpers
  • VST3 Bundle
  • Testing
  • Examples
  • Troubleshooting
  • Licensing
  • GitHub
  • Zaza
  • Azazel

This view

  • Original page
  • New address

GeezerVison is showing godofecht.github.io — Testing · danzig

Testing

Two suites, one command.

zig build test --summary all
Build Summary: 9/9 steps succeeded; 35/35 tests passed

Unit tests

src/tests.zig, 35 tests, run with zig build test-unit. No artifact and no host required. They cover:

  • dB and linear conversion in both directions, including the round trip and the -80 dB floor.
  • linearInterpolate and clamp at endpoints and midpoints.
  • AudioBuffer init, zeroing, and clear.
  • GainProcessor dB conversion, normalized mapping, clamping, and that process ramps rather than jumping.
  • SimpleRamp instant mode, arrival at target, and restart on setTarget.
  • normalize and denormalize, including the degenerate zero-width range.
  • AtomicParam: the 64-byte size assertion, clamping, denormalization, instant mode, monotone non-overshooting smoothing, snap, and setSmoothingMs with non-positive input.
  • ParamStore: index allocation, round trip, out-of-range tolerance, tickAll, and snapAll.

VST3 ABI integration harness

examples/danzig-test, run with zig build test-integration. This one links the built DanzigGain plugin and calls into it the way a host does.

danzig integration harness

VST3 module entry
  ok    bundleEntry accepts the load and reports success

VST3 factory ABI
  ok    GetPluginFactory returns a non-null object
  ok    countClasses reports one exported class
  ...
  ok    createInstance accepts the advertised class id
  ok    the object hands back IAudioProcessor
  ok    the object hands back IEditController
  ...
  ok    setupProcessing accepts 48 kHz
  ok    process returns kResultOk
  ok    the default 0 dB setting passes DC through at unity
  ok    bypass passes the input through untouched
  ok    releasing the last reference drops the count to zero

danzig static library
  ok    AudioBuffer reports its geometry
  ok    dBToLinear(0 dB) is unity
  ok    dBToLinear(+6 dB) is ~1.995
  ok    ParamStore reaches +48 dB at full scale

all integration checks passed

About fifty checks run in all, covering the factory, createInstance, the interface queries, the bus and parameter reports, and a full setupProcessing/setActive/process pass whose output is checked against the DSP. The harness declares its own copy of the IPluginFactory vtable rather than importing the plugin's Zig types. It reads the first word of the returned pointer as a vtable pointer and calls through the C function pointers. If the object layout ever stops matching what a host expects, the dereference fails here before it fails in a DAW.

It returns a non-zero exit code on failure, so zig build test fails with it.

CI

.github/workflows/ci.yml runs zig build and zig build test on macos-15 against 0.14.1, 0.15.2, and 0.16.0. The runner is pinned to macos-15 rather than macos-latest, because macos-latest now ships an Xcode whose SDK Zig 0.14.1 cannot link against.

← VST3 Bundle Next: Examples →
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.