From 7aa618b23608be1dcc7df41cfa18e2236b1aa50a Mon Sep 17 00:00:00 2001 From: Eason Lu Date: Sun, 11 Feb 2024 15:47:45 -0800 Subject: [PATCH] Add cmake test and finish the project Signed-off-by: Eason Lu --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e0d7d2b..ed75ff4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required(VERSION 3.27) project(Randp) +include(CTest) +enable_testing() + set(CMAKE_CXX_STANDARD 23) add_executable(Randp main.cpp @@ -8,3 +11,9 @@ add_executable(Randp main.cpp binTree.h randArray.cpp randArray.h) + +add_test(NAME Randp1 COMMAND Randp 1) +add_test(NAME Randp10 COMMAND Randp 10) +add_test(NAME Randp100 COMMAND Randp 100) +add_test(NAME Randp1000 COMMAND Randp 1000) +add_test(NAME Randp10000 COMMAND Randp 10000) \ No newline at end of file