Add default score to b_best
Add doxyfile config
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -39,3 +39,5 @@ cmake-build*/**
|
|||||||
puml/**
|
puml/**
|
||||||
.vscode/settings.json
|
.vscode/settings.json
|
||||||
*.dot
|
*.dot
|
||||||
|
diagrams/html/**
|
||||||
|
diagrams/latex/**
|
||||||
|
1
lib/catch2
Submodule
1
lib/catch2
Submodule
Submodule lib/catch2 added at 1078e7e95b
1
lib/json
Submodule
1
lib/json
Submodule
Submodule lib/json added at 0457de21cf
1
lib/mdlp
Submodule
1
lib/mdlp
Submodule
Submodule lib/mdlp added at 5708dc3de9
@@ -8,7 +8,7 @@
|
|||||||
void manageArguments(argparse::ArgumentParser& program, int argc, char** argv)
|
void manageArguments(argparse::ArgumentParser& program, int argc, char** argv)
|
||||||
{
|
{
|
||||||
program.add_argument("-m", "--model").default_value("").help("Filter results of the selected model) (any for all models)");
|
program.add_argument("-m", "--model").default_value("").help("Filter results of the selected model) (any for all models)");
|
||||||
program.add_argument("-s", "--score").default_value("").help("Filter results of the score name supplied");
|
program.add_argument("-s", "--score").default_value("accuracy").help("Filter results of the score name supplied");
|
||||||
program.add_argument("--friedman").help("Friedman test").default_value(false).implicit_value(true);
|
program.add_argument("--friedman").help("Friedman test").default_value(false).implicit_value(true);
|
||||||
program.add_argument("--excel").help("Output to excel").default_value(false).implicit_value(true);
|
program.add_argument("--excel").help("Output to excel").default_value(false).implicit_value(true);
|
||||||
program.add_argument("--level").help("significance level").default_value(0.05).scan<'g', double>().action([](const std::string& value) {
|
program.add_argument("--level").help("significance level").default_value(0.05).scan<'g', double>().action([](const std::string& value) {
|
||||||
|
34
tests/TestResult.cc
Normal file
34
tests/TestResult.cc
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
#define CATCH_CONFIG_MAIN
|
||||||
|
#include "catch.hpp"
|
||||||
|
#include "Result.h"
|
||||||
|
#include <filesystem>
|
||||||
|
|
||||||
|
TEST_CASE("Result class tests", "[Result]")
|
||||||
|
{
|
||||||
|
std::string testPath = "test_data";
|
||||||
|
std::string testFile = "test.json";
|
||||||
|
|
||||||
|
SECTION("Constructor and load method")
|
||||||
|
{
|
||||||
|
platform::Result result(testPath, testFile);
|
||||||
|
REQUIRE(result.date != "");
|
||||||
|
REQUIRE(result.score >= 0);
|
||||||
|
REQUIRE(result.scoreName != "");
|
||||||
|
REQUIRE(result.title != "");
|
||||||
|
REQUIRE(result.duration >= 0);
|
||||||
|
REQUIRE(result.model != "");
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTION("to_string method")
|
||||||
|
{
|
||||||
|
platform::Result result(testPath, testFile);
|
||||||
|
std::string resultStr = result.to_string(1);
|
||||||
|
REQUIRE(resultStr != "");
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTION("Exception handling in load method")
|
||||||
|
{
|
||||||
|
std::string invalidFile = "invalid.json";
|
||||||
|
REQUIRE_THROWS_AS(platform::Result(testPath, invalidFile), std::invalid_argument);
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user