fluidsynth/test
derselbst 291075c31f fix build for gcc 2018-04-25 12:33:47 +02:00
..
CMakeLists.txt fuse preset iteration tests to preset+sample loading tests 2018-04-24 21:32:49 +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_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_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

README.md

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.