Skip to content

Commit

Permalink
fix: tests not executed
Browse files Browse the repository at this point in the history
  • Loading branch information
headblockhead committed Jan 8, 2025
1 parent f39d827 commit 7e916ec
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,4 @@ add_library(
target_include_directories(squirrel PUBLIC include)
set_target_properties(squirrel PROPERTIES PUBLIC_HEADER include/squirrel.h)

if(BUILD_TESTING)
add_subdirectory(tests)
endif()
add_subdirectory(tests)
24 changes: 12 additions & 12 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,59 @@ if(CMAKE_COMPILER_IS_GNUCXX)
include(CodeCoverage)
append_coverage_compiler_flags()
setup_target_for_coverage_gcovr_html(squirrel squirrel_test coverage)
list(APPEND GCOVR_EXCLUDES "tests/")
list(APPEND GCOVR_EXCLUDES "")
endif()

add_executable(keyboard_press_release tests/keyboard_press_release.c)
add_executable(keyboard_press_release keyboard_press_release.c)
target_link_libraries(keyboard_press_release squirrel)
add_test(NAME keyboard_press_release COMMAND keyboard_press_release)

add_executable(keyboard_modifier_press_release
tests/keyboard_modifier_press_release.c)
keyboard_modifier_press_release.c)
target_link_libraries(keyboard_modifier_press_release squirrel)
add_test(NAME keyboard_modifier_press_release
COMMAND keyboard_modifier_press_release)

add_executable(quantum_passthrough_press_release
tests/quantum_passthrough_press_release.c)
quantum_passthrough_press_release.c)
target_link_libraries(quantum_passthrough_press_release squirrel)
add_test(NAME quantum_passthrough_press_release
COMMAND quantum_passthrough_press_release)

add_executable(keyboard_get_keycodes tests/keyboard_get_keycodes.c)
add_executable(keyboard_get_keycodes keyboard_get_keycodes.c)
target_link_libraries(keyboard_get_keycodes squirrel)
add_test(NAME keyboard_get_keycodes COMMAND keyboard_get_keycodes)

add_executable(consumer_press_release tests/consumer_press_release.c)
add_executable(consumer_press_release consumer_press_release.c)
target_link_libraries(consumer_press_release squirrel)
add_test(NAME consumer_press_release COMMAND consumer_press_release)

add_executable(key tests/key.c)
add_executable(key key.c)
target_link_libraries(key squirrel)
add_test(NAME key COMMAND key)

add_executable(layer_press_release tests/layer_press_release.c)
add_executable(layer_press_release layer_press_release.c)
target_link_libraries(layer_press_release squirrel)
add_test(NAME layer_press_release COMMAND layer_press_release)

add_executable(consumer_activate_deactivate_get_consumer_code
tests/consumer_activate_deactivate_get_consumer_code.c)
consumer_activate_deactivate_get_consumer_code.c)
target_link_libraries(consumer_activate_deactivate_get_consumer_code squirrel)
add_test(NAME consumer_activate_deactivate_get_consumer_code
COMMAND consumer_activate_deactivate_get_consumer_code)

add_executable(keyboard_activate_deactivate_keycode
tests/keyboard_activate_deactivate_keycode.c)
keyboard_activate_deactivate_keycode.c)
target_link_libraries(keyboard_activate_deactivate_keycode squirrel)
add_test(NAME keyboard_activate_deactivate_keycode
COMMAND keyboard_activate_deactivate_keycode)

add_executable(keyboard_activate_deactivate_get_modifier
tests/keyboard_activate_deactivate_get_modifier.c)
keyboard_activate_deactivate_get_modifier.c)
target_link_libraries(keyboard_activate_deactivate_get_modifier squirrel)
add_test(NAME keyboard_activate_deactivate_get_modifier
COMMAND keyboard_activate_deactivate_get_modifier)

add_executable(keymap tests/keymap.c)
add_executable(keymap keymap.c)
target_link_libraries(keymap squirrel)
add_test(NAME keymap COMMAND keymap)
2 changes: 1 addition & 1 deletion tests/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <stdlib.h>

int main() {
squirrel_init();
squirrel_init(2);

layers[0].keys[0] = keyboard(0x00);
layers[0].keys[1] = keyboard(0x01);
Expand Down

0 comments on commit 7e916ec

Please sign in to comment.