Update config.h names

This commit is contained in:
2024-04-03 12:20:31 +02:00
parent afb4e930d0
commit 920c7b5d53
4 changed files with 9 additions and 10 deletions

View File

@@ -7,9 +7,8 @@
#define PROJECT_VERSION_MINOR @PROJECT_VERSION_MINOR @
#define PROJECT_VERSION_PATCH @PROJECT_VERSION_PATCH @
static constexpr std::string_view project_name = "@PROJECT_NAME@";
static constexpr std::string_view project_version = "@PROJECT_VERSION@";
static constexpr std::string_view project_description = "@PROJECT_DESCRIPTION@";
static constexpr std::string_view git_sha = "@GIT_SHA@";
static constexpr std::string_view data_path = "@Folding_SOURCE_DIR@/tests/data/";
static constexpr std::string_view csv_path = "@Folding_SOURCE_DIR@/tests/csv/";
static constexpr std::string_view folding_project_name = "@PROJECT_NAME@";
static constexpr std::string_view folding_project_version = "@PROJECT_VERSION@";
static constexpr std::string_view folding_project_description = "@PROJECT_DESCRIPTION@";
static constexpr std::string_view folding_data_path = "@Folding_SOURCE_DIR@/tests/data/";
static constexpr std::string_view folding_csv_path = "@Folding_SOURCE_DIR@/tests/csv/";

View File

@@ -21,7 +21,7 @@ namespace folding {
}
virtual std::pair<std::vector<int>, std::vector<int>> getFold(int nFold) = 0;
virtual ~Fold() = default;
std::string version() { return { project_version.begin(), project_version.end() }; }
std::string version() { return { folding_project_version.begin(), folding_project_version.end() }; }
int getNumberOfFolds() { return k; }
};
class KFold : public Fold {

View File

@@ -6,7 +6,7 @@
TEST_CASE("Version Test", "[Folding]")
{
std::string actual_version = { project_version.begin(), project_version.end() };
std::string actual_version = { folding_project_version.begin(), folding_project_version.end() };
auto data = std::vector<int>(100);
folding::StratifiedKFold stratified_kfold(5, data, 17);
REQUIRE(stratified_kfold.version() == actual_version);

View File

@@ -45,11 +45,11 @@ class Paths {
public:
static std::string datasets()
{
return { data_path.begin(), data_path.end() };
return { folding_data_path.begin(), folding_data_path.end() };
}
static std::string csv()
{
return { csv_path.begin(), csv_path.end() };
return { folding_csv_path.begin(), folding_csv_path.end() };
}
};
class CSVFiles {