Enable firmware tests

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
Joey Yakimowich-Payne 2026-08-11 12:23:07 +09:00
commit 01cf6ed26f
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,24 @@
cmake_minimum_required(VERSION 3.13)
project(switch-pico-firmware-tests LANGUAGES CXX)
enable_testing()
add_executable(switch-pico-firmware-tests
../../switch2_commands.cpp
../../switch2_descriptors.cpp
../../switch2_reports.cpp
../../switch_uart_protocol.cpp
test_main.cpp
test_legacy_descriptors.cpp
test_switch2_commands.cpp
test_switch2_descriptors.cpp
test_switch2_reports.cpp
test_switch_input.cpp
test_switch_uart_protocol.cpp
)
target_compile_features(switch-pico-firmware-tests PRIVATE cxx_std_17)
target_include_directories(switch-pico-firmware-tests PRIVATE ../..)
add_test(NAME switch-pico-firmware-tests COMMAND switch-pico-firmware-tests)

View file

@ -0,0 +1,12 @@
#include "test_support.h"
int main() {
TestRunner runner;
run_legacy_descriptor_tests(runner);
run_switch2_command_tests(runner);
run_switch2_descriptor_tests(runner);
run_switch2_report_tests(runner);
run_switch_input_tests(runner);
run_switch_uart_protocol_tests(runner);
return runner.result();
}