Add tests for libraries required versions
This commit is contained in:
@@ -5,11 +5,13 @@ if(ENABLE_TESTING)
|
||||
${Platform_SOURCE_DIR}/lib/argparse/include
|
||||
${Platform_SOURCE_DIR}/lib/mdlp
|
||||
${Platform_SOURCE_DIR}/lib/Files
|
||||
${Platform_SOURCE_DIR}/lib/json/include
|
||||
${Platform_SOURCE_DIR}/lib/folding
|
||||
${CMAKE_BINARY_DIR}/configured_files/include
|
||||
/usr/local/include
|
||||
)
|
||||
set(TEST_SOURCES_PLATFORM TestUtils.cpp TestPlatform.cpp)
|
||||
add_executable(${TEST_PLATFORM} ${TEST_SOURCES_PLATFORM})
|
||||
target_link_libraries(${TEST_PLATFORM} PUBLIC "${TORCH_LIBRARIES}" ArffFiles mdlp Catch2::Catch2WithMain)
|
||||
target_link_libraries(${TEST_PLATFORM} PUBLIC "${TORCH_LIBRARIES}" ArffFiles mdlp Catch2::Catch2WithMain BayesNet)
|
||||
add_test(NAME ${TEST_PLATFORM} COMMAND ${TEST_PLATFORM})
|
||||
endif(ENABLE_TESTING)
|
||||
|
@@ -6,11 +6,28 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "TestUtils.h"
|
||||
#include "folding.hpp"
|
||||
#include <bayesnet/classifiers/TAN.h>
|
||||
#include "config.h"
|
||||
|
||||
|
||||
TEST_CASE("Test Python Classifiers score", "[PyClassifiers]")
|
||||
TEST_CASE("Test Platform version", "[Platform]")
|
||||
{
|
||||
std::string version = { platform_project_version.begin(), platform_project_version.end() };
|
||||
REQUIRE(version == "1.0.4");
|
||||
}
|
||||
TEST_CASE("Test Folding library version", "[Folding]")
|
||||
{
|
||||
auto kfold = folding::KFold(5, 100);
|
||||
REQUIRE(kfold.version() == "1.0.1");
|
||||
}
|
||||
TEST_CASE("Test BayesNet version", "[BayesNet]")
|
||||
{
|
||||
std::string version = bayesnet::TAN().getVersion();
|
||||
REQUIRE(version == "1.0.4");
|
||||
}
|
||||
TEST_CASE("Test mdlp version", "[mdlp]")
|
||||
{
|
||||
std::string version = mdlp::CPPFImdlp::version();
|
||||
REQUIRE(version == "1.1.2");
|
||||
}
|
Reference in New Issue
Block a user