mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-27 14:32:12 +00:00
add unit test README
This commit is contained in:
parent
de68492710
commit
4ce0e3eced
2 changed files with 7 additions and 0 deletions
|
@ -8,6 +8,7 @@ macro ( ADD_FLUID_TEST _test )
|
|||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include> # include auto generated headers
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include> # include "normal" public (sub-)headers
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src> # include private headers
|
||||
$<TARGET_PROPERTY:libfluidsynth,INCLUDE_DIRECTORIES> # include all other header search paths needed by libfluidsynth (esp. glib)
|
||||
)
|
||||
|
||||
ADD_TEST(NAME ${_test} COMMAND ${_test})
|
||||
|
|
6
test/README.md
Normal file
6
test/README.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
This directory contains small executables to verify fluidsynths correct behaviour, i.e. unit tests. 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! Do **not** blindly use the tests as template for your application! Keep referring to the documentation and code examples listed in the [http://www.fluidsynth.org/api/](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`.
|
Loading…
Reference in a new issue