stuff-from-scratch/test/core/TestTomlReader.cpp

20 lines
489 B
C++
Raw Normal View History

2022-10-09 16:39:46 +00:00
#include "TomlReader.h"
2022-11-29 18:00:19 +00:00
#include "TestFramework.h"
2022-12-01 10:52:48 +00:00
#include "TestUtils.h"
2022-10-09 16:39:46 +00:00
2022-11-29 18:00:19 +00:00
TEST_CASE(TestTomlReader, "core")
2022-10-09 16:39:46 +00:00
{
auto reader = TomlReader();
2022-12-01 10:52:48 +00:00
reader.read(TestUtils::getTestDataDir() / "sample_toml.toml");
2022-10-09 16:39:46 +00:00
auto themes_table = reader.getContent()->getTable("themes");
2022-11-30 18:28:50 +00:00
REQUIRE(themes_table);
for (const auto& items : themes_table->getKeyValuePairs())
{
2022-12-01 10:52:48 +00:00
//std::cout << "Got entry with key: " << items.first << " and val " << items.second << std::endl;
}
}