Fix tests
This commit is contained in:
3
Makefile
3
Makefile
@@ -111,9 +111,8 @@ release: ## Build a Release version of the project with Conan
|
|||||||
opt = ""
|
opt = ""
|
||||||
test: ## Run tests (opt="-s") to verbose output the tests, (opt="-c='Test Maximum Spanning Tree'") to run only that section
|
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...";
|
@echo ">>> Running Platform tests...";
|
||||||
@$(MAKE) clean
|
|
||||||
@$(MAKE) debug
|
@$(MAKE) debug
|
||||||
@$(call "Compile_target", "Debug", "$(f_debug)", $(test_targets))
|
@$(call compile_target, "Debug", "$(f_debug)", $(test_targets))
|
||||||
@for t in $(test_targets); do \
|
@for t in $(test_targets); do \
|
||||||
if [ -f $(f_debug)/tests/$$t ]; then \
|
if [ -f $(f_debug)/tests/$$t ]; then \
|
||||||
cd $(f_debug)/tests ; \
|
cd $(f_debug)/tests ; \
|
||||||
|
@@ -13,6 +13,6 @@ if(ENABLE_TESTING)
|
|||||||
)
|
)
|
||||||
add_executable(${TEST_PLATFORM} ${TEST_SOURCES_PLATFORM})
|
add_executable(${TEST_PLATFORM} ${TEST_SOURCES_PLATFORM})
|
||||||
target_link_libraries(${TEST_PLATFORM} PUBLIC
|
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})
|
add_test(NAME ${TEST_PLATFORM} COMMAND ${TEST_PLATFORM})
|
||||||
endif(ENABLE_TESTING)
|
endif(ENABLE_TESTING)
|
||||||
|
@@ -15,25 +15,25 @@
|
|||||||
TEST_CASE("Test Platform version", "[Platform]")
|
TEST_CASE("Test Platform version", "[Platform]")
|
||||||
{
|
{
|
||||||
std::string version = { platform_project_version.begin(), platform_project_version.end() };
|
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]")
|
TEST_CASE("Test Folding library version", "[Folding]")
|
||||||
{
|
{
|
||||||
std::string version = folding::KFold(5, 100).version();
|
std::string version = folding::KFold(5, 100).version();
|
||||||
REQUIRE(version == "1.1.1");
|
REQUIRE(version == "1.1.2");
|
||||||
}
|
}
|
||||||
TEST_CASE("Test BayesNet version", "[BayesNet]")
|
TEST_CASE("Test BayesNet version", "[BayesNet]")
|
||||||
{
|
{
|
||||||
std::string version = bayesnet::TAN().getVersion();
|
std::string version = bayesnet::TAN().getVersion();
|
||||||
REQUIRE(version == "1.1.2");
|
REQUIRE(version == "1.2.1");
|
||||||
}
|
}
|
||||||
TEST_CASE("Test mdlp version", "[mdlp]")
|
TEST_CASE("Test mdlp version", "[mdlp]")
|
||||||
{
|
{
|
||||||
std::string version = mdlp::CPPFImdlp::version();
|
std::string version = mdlp::CPPFImdlp::version();
|
||||||
REQUIRE(version == "2.0.1");
|
REQUIRE(version == "2.1.1");
|
||||||
}
|
}
|
||||||
TEST_CASE("Test Arff version", "[Arff]")
|
TEST_CASE("Test Arff version", "[Arff]")
|
||||||
{
|
{
|
||||||
std::string version = ArffFiles().version();
|
std::string version = ArffFiles().version();
|
||||||
REQUIRE(version == "1.1.0");
|
REQUIRE(version == "1.2.1");
|
||||||
}
|
}
|
@@ -5,7 +5,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <ArffFiles/ArffFiles.hpp>
|
#include <ArffFiles.hpp>
|
||||||
#include <fimdlp/CPPFImdlp.h>
|
#include <fimdlp/CPPFImdlp.h>
|
||||||
|
|
||||||
bool file_exists(const std::string& name);
|
bool file_exists(const std::string& name);
|
||||||
|
Reference in New Issue
Block a user