2024-05-12 10:22:44 +00:00
|
|
|
// ***************************************************************
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2024 Ricardo Montañana Gómez
|
|
|
|
// SPDX-FileType: SOURCE
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
// ***************************************************************
|
|
|
|
|
|
|
|
#include <catch2/catch_test_macros.hpp>
|
|
|
|
#include <catch2/matchers/catch_matchers.hpp>
|
|
|
|
#include <string>
|
2024-11-23 17:22:41 +00:00
|
|
|
#include <CPPFImdlp.h>
|
2024-05-12 10:22:44 +00:00
|
|
|
#include <folding.hpp>
|
|
|
|
#include <nlohmann/json.hpp>
|
|
|
|
#define TO_STR2(x) #x
|
|
|
|
#define TO_STR(x) TO_STR2(x)
|
|
|
|
#define JSON_VERSION (TO_STR(NLOHMANN_JSON_VERSION_MAJOR) "." TO_STR(NLOHMANN_JSON_VERSION_MINOR))
|
|
|
|
#include "TestUtils.h"
|
|
|
|
|
|
|
|
std::map<std::string, std::string> modules = {
|
2024-11-23 17:22:41 +00:00
|
|
|
{ "mdlp", "2.0.1" },
|
2024-05-12 10:22:44 +00:00
|
|
|
{ "Folding", "1.1.0" },
|
2024-05-21 11:50:19 +00:00
|
|
|
{ "json", "3.11" },
|
2024-06-13 10:33:54 +00:00
|
|
|
{ "ArffFiles", "1.1.0" }
|
2024-05-12 10:22:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
TEST_CASE("MDLP", "[Modules]")
|
|
|
|
{
|
|
|
|
auto fimdlp = mdlp::CPPFImdlp();
|
|
|
|
REQUIRE(fimdlp.version() == modules["mdlp"]);
|
|
|
|
}
|
|
|
|
TEST_CASE("Folding", "[Modules]")
|
|
|
|
{
|
|
|
|
auto folding = folding::KFold(5, 200);
|
|
|
|
REQUIRE(folding.version() == modules["Folding"]);
|
|
|
|
}
|
|
|
|
TEST_CASE("NLOHMANN_JSON", "[Modules]")
|
|
|
|
{
|
|
|
|
REQUIRE(JSON_VERSION == modules["json"]);
|
|
|
|
}
|
2024-05-21 11:50:19 +00:00
|
|
|
TEST_CASE("ArffFiles", "[Modules]")
|
|
|
|
{
|
|
|
|
auto handler = ArffFiles();
|
|
|
|
REQUIRE(handler.version() == modules["ArffFiles"]);
|
|
|
|
}
|