16 lines
527 B
C++
16 lines
527 B
C++
|
#include <catch2/catch_test_macros.hpp>
|
||
|
#include <Garbage/SimpleConf.hpp>
|
||
|
|
||
|
TEST_CASE("Comments and empty lines are ignored")
|
||
|
{
|
||
|
using Required = Garbage::SimpleConf::Required;
|
||
|
using LookupError = Garbage::SimpleConfImplementation::LookupError;
|
||
|
|
||
|
std::filesystem::path path("TestConfigs/Comments.conf");
|
||
|
|
||
|
Garbage::SimpleConf config(path);
|
||
|
|
||
|
REQUIRE_THROWS_AS((config.Get<std::string, Required>("this shouldn't")), LookupError);
|
||
|
REQUIRE(config.Get<std::string, Required>("while this") == "is accessible");
|
||
|
}
|