On 07/27/2011 05:24 PM, Adrian Knoth wrote:
I recently started hacking on a jack-driven matrix
mixer (goals so far:
GUI, maybe network controls (OSC?), maybe LV2 host), and I wonder if
there are "frameworks" for test-driven development, so I can come up
with unit and acceptance tests while implementing new functionality.
I use the Boost unit test framework. Other LA projects are using cpptest.
Has anyone ever done test-first with jack? One could
start jackd in
dummy mode with a random name, start some clients, wire inputs to
outputs and compare the generated signal to the expected result, maybe
with some fuzzy logic to allow for arbitrary delays.
Since I'm usually not running tests while running a stable audio
set-up... I usually just make sure that jackd is started before my tests
run. The down-side of this is that build servers won't run the tests
because they're /not/ going to start jackd.
OTOH, if there are existing mocking libraries for
jackd, things might be
a bit more straight forward (provide an input buffer to be returned by
jack_port_get_buffer, call the process function and check the result
that's written to the output buffer).
I've been hankering to do this for some time. I.e. provide a library:
And then run your tests with this:
The mock library wouldn't necc. /work/... just simply do just enough for