2019-11-23 19:10:37 +01:00
|
|
|
###############################
|
|
|
|
|
# Test application
|
|
|
|
|
|
2023-03-07 17:35:56 +01:00
|
|
|
if(SFIZZ_USE_SYSTEM_CATCH)
|
|
|
|
|
find_package(Catch2 REQUIRED)
|
|
|
|
|
if(Catch2_FOUND)
|
|
|
|
|
message(STATUS "Found system Catch2 CMake modules in ${Catch2_DIR}")
|
|
|
|
|
endif()
|
|
|
|
|
else()
|
|
|
|
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/catch2")
|
|
|
|
|
endif()
|
2021-03-18 00:42:04 +01:00
|
|
|
|
|
|
|
|
include(CTest)
|
|
|
|
|
include(Catch)
|
|
|
|
|
|
2019-11-23 19:10:37 +01:00
|
|
|
set(SFIZZ_TEST_SOURCES
|
2020-11-08 23:59:28 +01:00
|
|
|
DirectRegionT.cpp
|
|
|
|
|
RegionValuesT.cpp
|
2021-04-01 06:32:42 +02:00
|
|
|
RegionValuesSetT.cpp
|
2020-08-10 17:22:49 +02:00
|
|
|
TestHelpers.h
|
|
|
|
|
TestHelpers.cpp
|
2019-12-18 10:24:01 +01:00
|
|
|
ParsingT.cpp
|
2021-04-15 22:25:17 +02:00
|
|
|
BindingsT.cpp
|
2019-11-23 19:10:37 +01:00
|
|
|
HelpersT.cpp
|
|
|
|
|
HelpersT.cpp
|
|
|
|
|
AudioBufferT.cpp
|
2019-12-28 23:01:45 +01:00
|
|
|
EGDescriptionT.cpp
|
2019-11-23 19:10:37 +01:00
|
|
|
RangeT.cpp
|
|
|
|
|
OpcodeT.cpp
|
|
|
|
|
BufferT.cpp
|
|
|
|
|
SIMDHelpersT.cpp
|
|
|
|
|
FilesT.cpp
|
2019-12-15 02:05:53 +01:00
|
|
|
MidiStateT.cpp
|
2020-05-28 23:33:48 +02:00
|
|
|
InterpolatorsT.cpp
|
2020-03-31 20:13:13 +02:00
|
|
|
SmoothersT.cpp
|
2020-06-15 02:03:04 +02:00
|
|
|
PolyphonyT.cpp
|
2019-11-23 19:10:37 +01:00
|
|
|
RegionActivationT.cpp
|
2019-11-30 14:50:57 +01:00
|
|
|
RegionValueComputationsT.cpp
|
2020-04-01 00:18:03 +02:00
|
|
|
# If we're tweaking the curves this kind of tests does not make sense
|
|
|
|
|
# Use integration tests with comparison curves
|
2020-03-31 00:03:21 +02:00
|
|
|
# ADSREnvelopeT.cpp
|
2020-09-16 09:03:39 +02:00
|
|
|
FlexEGT.cpp
|
2019-12-13 01:55:24 +01:00
|
|
|
EventEnvelopesT.cpp
|
2019-11-23 19:10:37 +01:00
|
|
|
MainT.cpp
|
2019-11-30 15:40:13 +01:00
|
|
|
SynthT.cpp
|
2020-03-15 02:09:40 +01:00
|
|
|
CurveT.cpp
|
2019-11-23 19:10:37 +01:00
|
|
|
RegionTriggersT.cpp
|
2020-02-13 07:37:06 +01:00
|
|
|
FloatHelpersT.cpp
|
2020-06-16 11:32:34 +02:00
|
|
|
RandomHelpersT.cpp
|
2020-02-13 21:42:03 +01:00
|
|
|
WavetablesT.cpp
|
2020-04-13 00:33:16 +02:00
|
|
|
SemaphoreT.cpp
|
2020-06-15 10:59:12 +02:00
|
|
|
SwapAndPopT.cpp
|
2020-05-19 14:51:33 +02:00
|
|
|
TuningT.cpp
|
2020-07-15 11:55:33 +02:00
|
|
|
ConcurrencyT.cpp
|
2020-07-26 19:25:59 +02:00
|
|
|
ModulationsT.cpp
|
2020-08-12 00:31:19 +02:00
|
|
|
LFOT.cpp
|
2020-10-19 02:58:01 +02:00
|
|
|
MessagingT.cpp
|
2021-02-24 03:27:46 +01:00
|
|
|
OversamplerT.cpp
|
2021-09-22 03:12:52 +02:00
|
|
|
MemoryT.cpp
|
2020-08-12 00:31:19 +02:00
|
|
|
DataHelpers.h
|
|
|
|
|
DataHelpers.cpp
|
2019-11-23 19:10:37 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
add_executable(sfizz_tests ${SFIZZ_TEST_SOURCES})
|
2021-04-15 22:25:17 +02:00
|
|
|
target_link_libraries(sfizz_tests PRIVATE sfizz::internal sfizz::static sfizz::spin_mutex sfizz::jsl sfizz::filesystem)
|
2021-09-22 05:34:40 +02:00
|
|
|
if(APPLE AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS "10.12")
|
|
|
|
|
# workaround for incomplete C++17 runtime on macOS
|
|
|
|
|
target_compile_definitions(sfizz_tests PRIVATE "CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS")
|
|
|
|
|
endif()
|
2020-01-19 09:51:43 +01:00
|
|
|
sfizz_enable_lto_if_needed(sfizz_tests)
|
2020-09-02 00:36:49 +02:00
|
|
|
sfizz_enable_fast_math(sfizz_tests)
|
2021-03-18 00:42:04 +01:00
|
|
|
catch_discover_tests(sfizz_tests)
|