Table of Contents


It is located in test/dgreftest folder. It is only compiled if configure was run with smf support (implicit in cli) and unittests.

This is the output when run with no arguments:

$ ./dgreftest 
Usage: ./dgreftest testname drumkit midimap [seed]

testname is the basename used to create two files: testname.mid and testname.wav, ie. testname = “foo” will look for the files foo.mid and foo.wav.

Drumkit and midimap are the usual arguments as known from the drumgizmo command line interface.

The seed is an integer used to seed the Random engines. It is optional, and will efault to 0 if omittted.

Run test

To run the dgreftest on an existing set of files it is important to use the same drumkit, midimap and seed as was originally used.

A couple of test can be downloaded here:

They can be run with the following two commandlines:

$ ./dgreftest test-aasimonster /your/path/to/aasimonster/{aasimonster,midimap}.xml 42
$ ./dgreftest test-aasimonster2 /your/path/to/aasimonster2/{aasimonster,midimap}.xml 42

At the end of the test a diff value is being printet. It is the difference sum of all samples in the output compared to the reference file. If it is 0 the test tells us that the code did not change compared to when the reference file was generated.

diff_samples: 0

Be aware that a result not 0 is not nessecarily an error, it just signifies that something changed somewhere but it might have changed into something else that is also correct.

If there is a change it is however important to put some thought into why there is a change and whether it is actually a good thing ;)

Create test

To create a test, simply run the application only with the .mid file. This will make dgreftest create the .wav file.

dev/dgreftest.txt · Last modified: 2016/05/26 19:31 by deva
Trace: dgreftest
GNU Free Documentation License 1.3
Valid CSS Driven by DokuWiki Recent changes RSS feed Valid XHTML 1.0