foot/emulator/tests/CMakeLists.txt
shylie f3773fc82b
All checks were successful
Test / build (push) Successful in 12s
Add more tests, fix division and modulus
2025-07-08 15:54:54 -04:00

26 lines
638 B
CMake

cmake_minimum_required(VERSION 3.20)
include(CTest)
function(test name)
add_executable(foot-emulator-test-${name} ${name}.cpp test-common.h)
target_link_libraries(foot-emulator-test-${name} PUBLIC foot-emulator)
add_test(NAME ${name} COMMAND foot-emulator-test-${name})
endfunction()
test(cnst-instruction)
test(bwng-instruction)
test(arng-instruction)
test(long-instruction)
test(bwor-instruction)
test(band-instruction)
test(bxor-instruction)
test(srsh-instruction)
test(zlsh-instruction)
test(clsh-instruction)
test(addi-instruction)
test(subt-instruction)
test(mult-instruction)
test(divi-instruction)
test(modu-instruction)