mirror of
https://github.com/szymon-jozef/static-site-generator.git
synced 2026-09-07 12:10:42 +02:00
Added unit testing with Catch2 framework
This commit is contained in:
13
src/tests.cpp
Normal file
13
src/tests.cpp
Normal 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");
|
||||
}
|
||||
Reference in New Issue
Block a user