use FetchContent to retrieve TOML test data

This commit is contained in:
Jordan Williams
2020-02-18 19:37:28 -06:00
parent ac1130f9f4
commit 4c34986db0
7 changed files with 74 additions and 26 deletions

View File

@@ -8,11 +8,12 @@
#include <toml.hpp>
#include <iostream>
#include <fstream>
#include <toml11/test/files.hpp>
#if defined(_MSC_VER) || defined(__INTEL_COMPILER)
BOOST_AUTO_TEST_CASE(test_hard_example_unicode)
{
const auto data = toml::parse("toml/tests/hard_example_unicode.toml");
const auto data = toml::parse(toml::test::file::hard_example_unicode);
const auto the = toml::find<toml::table>(data, "the");
BOOST_TEST(toml::get<std::string>(the.at("test_string")) ==
@@ -43,7 +44,7 @@ BOOST_AUTO_TEST_CASE(test_hard_example_unicode)
#else
BOOST_AUTO_TEST_CASE(test_hard_example_unicode)
{
const auto data = toml::parse("toml/tests/hard_example_unicode.toml");
const auto data = toml::parse(toml::test::file::hard_example_unicode);
const auto the = toml::find<toml::table>(data, "the");
BOOST_TEST(toml::get<std::string>(the.at("test_string")) ==