Add unittesting macro
This commit is contained in:
parent
71fc5e54e2
commit
79f451031b
6 changed files with 61 additions and 0 deletions
|
@ -30,3 +30,4 @@ ADD_SUBDIRECTORY (app_4)
|
|||
ADD_SUBDIRECTORY (app_6)
|
||||
ADD_SUBDIRECTORY (app_7)
|
||||
ADD_SUBDIRECTORY (app_8)
|
||||
ADD_SUBDIRECTORY (app_9)
|
||||
|
|
14
tests/app_9/CMakeLists.txt
Normal file
14
tests/app_9/CMakeLists.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
include(UseDUnittest)
|
||||
|
||||
# TODO
|
||||
# how to rerun cmake if a new file is created
|
||||
# I don't want to miss new unittests
|
||||
|
||||
# add all files
|
||||
file(GLOB files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.d")
|
||||
foreach(file IN LISTS files)
|
||||
add_unittests(${file})
|
||||
endforeach()
|
||||
|
||||
#add_unittests(moduleA.d)
|
||||
#add_unittests(moduleB.d)
|
4
tests/app_9/moduleA.d
Normal file
4
tests/app_9/moduleA.d
Normal file
|
@ -0,0 +1,4 @@
|
|||
unittest {
|
||||
assert(true);
|
||||
//assert(false);
|
||||
}
|
4
tests/app_9/moduleB.d
Normal file
4
tests/app_9/moduleB.d
Normal file
|
@ -0,0 +1,4 @@
|
|||
unittest {
|
||||
assert(true);
|
||||
//assert(false);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue