From e8b35d4c5ea1af4317dd58e09dffc29847b2de85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Montan=CC=83ana?= Date: Mon, 4 Aug 2025 12:29:22 +0200 Subject: [PATCH] Fix tests --- Makefile | 3 +-- tests/CMakeLists.txt | 2 +- tests/TestPlatform.cpp | 10 +++++----- tests/TestUtils.h | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 67e2d88..7c2eaa3 100644 --- a/Makefile +++ b/Makefile @@ -111,9 +111,8 @@ release: ## Build a Release version of the project with Conan opt = "" test: ## Run tests (opt="-s") to verbose output the tests, (opt="-c='Test Maximum Spanning Tree'") to run only that section @echo ">>> Running Platform tests..."; - @$(MAKE) clean @$(MAKE) debug - @$(call "Compile_target", "Debug", "$(f_debug)", $(test_targets)) + @$(call compile_target, "Debug", "$(f_debug)", $(test_targets)) @for t in $(test_targets); do \ if [ -f $(f_debug)/tests/$$t ]; then \ cd $(f_debug)/tests ; \ diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 021086a..68b584d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -13,6 +13,6 @@ if(ENABLE_TESTING) ) add_executable(${TEST_PLATFORM} ${TEST_SOURCES_PLATFORM}) target_link_libraries(${TEST_PLATFORM} PUBLIC - torch::torch fimdlp:fimdlp Catch2::Catch2WithMain bayesnet::bayesnet pyclassifiers::pyclassifiers) + torch::torch fimdlp::fimdlp Catch2::Catch2WithMain bayesnet::bayesnet) add_test(NAME ${TEST_PLATFORM} COMMAND ${TEST_PLATFORM}) endif(ENABLE_TESTING) diff --git a/tests/TestPlatform.cpp b/tests/TestPlatform.cpp index b5e0558..3da794c 100644 --- a/tests/TestPlatform.cpp +++ b/tests/TestPlatform.cpp @@ -15,25 +15,25 @@ TEST_CASE("Test Platform version", "[Platform]") { std::string version = { platform_project_version.begin(), platform_project_version.end() }; - REQUIRE(version == "1.1.0"); + REQUIRE(version == "1.1.1"); } TEST_CASE("Test Folding library version", "[Folding]") { std::string version = folding::KFold(5, 100).version(); - REQUIRE(version == "1.1.1"); + REQUIRE(version == "1.1.2"); } TEST_CASE("Test BayesNet version", "[BayesNet]") { std::string version = bayesnet::TAN().getVersion(); - REQUIRE(version == "1.1.2"); + REQUIRE(version == "1.2.1"); } TEST_CASE("Test mdlp version", "[mdlp]") { std::string version = mdlp::CPPFImdlp::version(); - REQUIRE(version == "2.0.1"); + REQUIRE(version == "2.1.1"); } TEST_CASE("Test Arff version", "[Arff]") { std::string version = ArffFiles().version(); - REQUIRE(version == "1.1.0"); + REQUIRE(version == "1.2.1"); } \ No newline at end of file diff --git a/tests/TestUtils.h b/tests/TestUtils.h index 4409d6f..aea25d6 100644 --- a/tests/TestUtils.h +++ b/tests/TestUtils.h @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include bool file_exists(const std::string& name);