Added unit testing with Catch2 framework

This commit is contained in:
2025-12-31 13:54:04 +01:00
parent abf9f1fa31
commit 7f98a33d7e
3 changed files with 23 additions and 10 deletions

13
src/tests.cpp Normal file
View File

@@ -0,0 +1,13 @@
#include "config.hpp"
#include <catch2/catch_all.hpp>
#include <string>
TEST_CASE("Checking config file read", "[config]") {
const std::string FILE_NAME = "../config/config_example.toml";
Config config = get_config(FILE_NAME);
REQUIRE(config.contact.author == "author");
REQUIRE(config.contact.email == "email@example.com");
REQUIRE(config.contact.signal == "signal url");
}