Skip to content

Commit

Permalink
Rename libdsp test
Browse files Browse the repository at this point in the history
  • Loading branch information
Segfault1602 committed Nov 28, 2023
1 parent d2d8ce9 commit 4c308b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"name": "(lldb) Tests",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/tests/tests",
"program": "${workspaceFolder}/build/tests/libdsp_tests",
"args": [
"--gtest_filter=BasicOscillatorsTest.*",
"--gtest_break_on_failure"
Expand All @@ -83,7 +83,7 @@
"name": "Tests",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build/tests/tests.exe",
"program": "${workspaceFolder}/build/tests/libdsp_tests.exe",
"args": [
"--gtest_filter=WaveguideGatesTest.SineWave"
],
Expand Down
14 changes: 6 additions & 8 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,15 @@ set(TEST_SOURCES

set(SOURCES ${TEST_SOURCES})

add_executable(tests ${TEST_SOURCES})
target_link_libraries(tests PUBLIC dsp PRIVATE sndfile GTest::gtest_main GTest::gmock_main)
add_executable(libdsp_tests ${TEST_SOURCES})
target_link_libraries(libdsp_tests PUBLIC dsp PRIVATE sndfile GTest::gtest_main GTest::gmock_main)

if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
target_compile_options(tests PRIVATE ${CLANG_COMPILER_OPTION})
target_compile_options(libdsp_tests PRIVATE ${CLANG_COMPILER_OPTION})
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
target_compile_options(tests PRIVATE ${MSVC_COMPILER_OPTION})
target_compile_options(libdsp_tests PRIVATE ${MSVC_COMPILER_OPTION})
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_compile_options(tests PRIVATE ${GCC_COMPILER_OPTION})
target_compile_options(libdsp_tests PRIVATE ${GCC_COMPILER_OPTION})
endif()


# add_test(NAME tests COMMAND tests WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
gtest_discover_tests(tests WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/.. XML_OUTPUT_DIR ${PROJECT_SOURCE_DIR}/test_results)
gtest_discover_tests(libdsp_tests WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/.. XML_OUTPUT_DIR ${PROJECT_SOURCE_DIR}/test_results)

0 comments on commit 4c308b3

Please sign in to comment.