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)