Fix tests

This commit is contained in:
2025-08-04 12:29:22 +02:00
parent 34a0719a16
commit e8b35d4c5e
4 changed files with 8 additions and 9 deletions

View File

@@ -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 ; \

View File

@@ -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)

View File

@@ -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");
}

View File

@@ -5,7 +5,7 @@
#include <vector>
#include <map>
#include <tuple>
#include <ArffFiles/ArffFiles.hpp>
#include <ArffFiles.hpp>
#include <fimdlp/CPPFImdlp.h>
bool file_exists(const std::string& name);