fluidsynth/test
2018-05-19 09:29:39 +02:00
..
CMakeLists.txt Merge pull request #385 from FluidSynth/issue49 2018-05-18 10:15:11 +02:00
README.md make VintageDreams sf2 an explicit requirement for unit tests 2018-04-11 11:03:12 +02:00
test.h avoid preprocessor stringification to expand to special '%' character 2018-04-21 10:37:04 +02:00
test_pointer_alignment.c add fluid_align_ptr() for aligning pointers 2018-04-26 16:07:19 +02:00
test_preset_sample_loading.c fix build for gcc 2018-04-25 12:33:47 +02:00
test_sample_cache.c make VintageDreams sf2 an explicit requirement for unit tests 2018-04-11 11:03:12 +02:00
test_sample_rate_change.c add test for sample rate changes 2018-04-11 11:12:01 +02:00
test_seqbind_unregister.c fix no-prototype warning in test_seqbind_unregister.c 2018-05-19 09:29:39 +02:00
test_sf3_sfont_loading.c Add VintageDreamsWaves-v2 in SF3 format and some tests for sf3 loading 2018-04-18 09:14:55 +02:00
test_sfont_loading.c test_sfont_loading: update unit test purpose 2018-04-11 11:12:01 +02:00
test_snprintf.c add a unit test for C99 compliant FLUID_SNPRINTF 2018-05-17 14:56:55 +02:00
test_synth_chorus_reverb.c rename reverb roomsize setting to match naming conventions 2018-05-17 21:44:03 +02:00

This directory contains small executables to verify fluidsynths correct behaviour, i.e. unit tests.

Do not blindly use the tests as template for your application!

Although some tests might serve as educational demonstration of how to use certain parts of fluidsynth, they are not intended to do so! It is most likely that those tests will consist of many hacky parts that are necessary to test fluidsynth (e.g. including fluidsynth's private headers to access internal data types and functions). For user applications this programming style is strongly discouraged! Keep referring to the documentation and code examples listed in the API documentation.

Developers

To add a unit test just duplicate an existing one, give it a unique name and update the CMakeLists.txt by

  • adding a call to ADD_FLUID_TEST() and
  • a dependency to the custom check target.

Make sure you call cmake with -Denable-tests=1 to build and execute the tests via make check. Unit tests should use the VintageDreamsWaves-v2.sf2 as test soundfont. Use the TEST_SOUNDFONT macro to access it.