Skip to content

Commit

Permalink
Added support for passing/failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
drowaudio committed May 20, 2024
1 parent cfdab39 commit 4507460
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 23 deletions.
7 changes: 5 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)

#======================================
message(CMAKE_CURRENT_SOURCE_DIR: ${CMAKE_CURRENT_SOURCE_DIR})
file(GLOB test_files LIST_DIRECTORIES false "${CMAKE_CURRENT_SOURCE_DIR}" test_*.cpp)
file(GLOB test_files LIST_DIRECTORIES false "${CMAKE_CURRENT_SOURCE_DIR}" pass_*.cpp fail_*.cpp)
message(test_files: ${test_files})

#======================================
Expand All @@ -28,7 +28,10 @@ foreach(file ${test_files})
)

add_test (NAME ${test_name} COMMAND ${test_name})
set_property(TEST ${test_name} PROPERTY WILL_FAIL TRUE)

if(${test_name} MATCHES "fail")
set_property(TEST ${test_name} PROPERTY WILL_FAIL TRUE)
endif()

endforeach()

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions tests/pass_small_function.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <functional>
#include <lib_rt_check.h>

struct doubles
{
double d[2];
};

int main()
{
realtime_context rc;
doubles d;
std::function<void()> fn = [d] { };

return 0;
}
21 changes: 0 additions & 21 deletions tests/test_small_function.cpp

This file was deleted.

0 comments on commit 4507460

Please sign in to comment.