From 66dbd53dda0f07db6bb0691610387f1a72d66aad Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Tue, 27 Aug 2024 20:39:13 +0100 Subject: [PATCH] Implement writing tests in Valeri itself --- CMakeLists.txt | 11 +++++++++++ test/numeric.vli | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 test/numeric.vli diff --git a/CMakeLists.txt b/CMakeLists.txt index 98dd6db..f47438e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 $ ) endforeach() + +foreach(testname IN LISTS LISP_TESTS) + add_test( + NAME "test_lisp_${testname}" + COMMAND sh -c "$ '${CMAKE_CURRENT_SOURCE_DIR}/test/${testname}.vli'" + ) +endforeach() diff --git a/test/numeric.vli b/test/numeric.vli new file mode 100644 index 0000000..5344c99 --- /dev/null +++ b/test/numeric.vli @@ -0,0 +1,5 @@ +;; -*- mode: lisp; -*- + +(assert (= 1 1)) + +(assert (!= 1 2))