diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index da2c1de..19c4daf 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -11,11 +11,11 @@ if(NOT DOCTEST_LIB) FetchContent_MakeAvailable(DocTest) endif() -add_executable(testTug setup.cpp testSimulation.cpp testGrid.cpp testFTCS.cpp) +add_executable(testTug setup.cpp testSimulation.cpp testGrid.cpp testFTCS.cpp testBoundary.cpp) target_link_libraries(testTug doctest tug) # get relative path of the CSV file -get_filename_component(testSimulationCSV "FTCS_11_11_7000.csv" REALPATH CACHE) +get_filename_component(testSimulationCSV "FTCS_11_11_7000.csv" REALPATH) # set relative path in header file configure_file(testSimulation.hpp.in testSimulation.hpp) # include test directory with generated header file from above diff --git a/test/testBoundary.cpp b/test/testBoundary.cpp index 7d7fe46..1d2bff2 100644 --- a/test/testBoundary.cpp +++ b/test/testBoundary.cpp @@ -13,7 +13,7 @@ TEST_CASE("BoundaryElement") { BoundaryElement boundaryElementClosed = BoundaryElement(); CHECK_NOTHROW(BoundaryElement()); CHECK_EQ(boundaryElementClosed.getType(), BC_TYPE_CLOSED); - CHECK_EQ(isnan(boundaryElementClosed.getValue()), isnan(NAN)); + CHECK_EQ(boundaryElementClosed.getValue(), -1); CHECK_THROWS(boundaryElementClosed.setValue(0.2)); }