Implement writing tests in Valeri itself

This commit is contained in:
Konstantin Nazarov 2024-08-27 20:39:13 +01:00
parent 781b3865c0
commit 66dbd53dda
Signed by: knazarov
GPG key ID: 4CFE0A42FA409C22
2 changed files with 16 additions and 0 deletions

View file

@ -60,6 +60,10 @@ set(CPP_TESTS
symbol
)
set(LISP_TESTS
numeric
)
foreach(testname IN LISTS CPP_TESTS)
add_executable("test_${testname}")
@ -76,3 +80,10 @@ foreach(testname IN LISTS CPP_TESTS)
COMMAND $<TARGET_FILE:test_${testname}>
)
endforeach()
foreach(testname IN LISTS LISP_TESTS)
add_test(
NAME "test_lisp_${testname}"
COMMAND sh -c "$<TARGET_FILE:vli> '${CMAKE_CURRENT_SOURCE_DIR}/test/${testname}.vli'"
)
endforeach()

5
test/numeric.vli Normal file
View file

@ -0,0 +1,5 @@
;; -*- mode: lisp; -*-
(assert (= 1 1))
(assert (!= 1 2))