fluidsynth/test
2018-04-08 10:04:53 +02:00
..
CMakeLists.txt disable ctest verbose output 2018-04-08 10:04:53 +02:00
README.md reformat test/README.md 2018-04-08 09:41:15 +02:00
test.h add unit test for sample cache 2018-04-06 22:15:17 +02:00
test_sample_cache.c make test_sample_cache C90 compliant 2018-04-07 19:09:49 +02:00
test_sfont_loading.c add unit test for soundfont [un|re]loading 2018-04-08 10:04:53 +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.