mirror of
https://github.com/ToruNiina/toml11.git
synced 2024-11-26 22:30:06 +00:00
test: set width in test_serialize
This commit is contained in:
parent
ba8c205253
commit
24aefc52a1
@ -15,7 +15,7 @@ BOOST_AUTO_TEST_CASE(test_example)
|
|||||||
const auto data = toml::parse("toml/tests/example.toml");
|
const auto data = toml::parse("toml/tests/example.toml");
|
||||||
{
|
{
|
||||||
std::ofstream ofs("tmp1.toml");
|
std::ofstream ofs("tmp1.toml");
|
||||||
ofs << data;
|
ofs << std::setw(80) << data;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto serialized = toml::parse("tmp1.toml");
|
auto serialized = toml::parse("tmp1.toml");
|
||||||
@ -36,7 +36,7 @@ BOOST_AUTO_TEST_CASE(test_fruit)
|
|||||||
const auto data = toml::parse("toml/tests/fruit.toml");
|
const auto data = toml::parse("toml/tests/fruit.toml");
|
||||||
{
|
{
|
||||||
std::ofstream ofs("tmp2.toml");
|
std::ofstream ofs("tmp2.toml");
|
||||||
ofs << data;
|
ofs << std::setw(80) << data;
|
||||||
}
|
}
|
||||||
const auto serialized = toml::parse("tmp2.toml");
|
const auto serialized = toml::parse("tmp2.toml");
|
||||||
BOOST_CHECK(data == serialized);
|
BOOST_CHECK(data == serialized);
|
||||||
@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE(test_hard_example)
|
|||||||
const auto data = toml::parse("toml/tests/hard_example.toml");
|
const auto data = toml::parse("toml/tests/hard_example.toml");
|
||||||
{
|
{
|
||||||
std::ofstream ofs("tmp3.toml");
|
std::ofstream ofs("tmp3.toml");
|
||||||
ofs << data;
|
ofs << std::setw(80) << data;
|
||||||
}
|
}
|
||||||
const auto serialized = toml::parse("tmp3.toml");
|
const auto serialized = toml::parse("tmp3.toml");
|
||||||
BOOST_CHECK(data == serialized);
|
BOOST_CHECK(data == serialized);
|
||||||
|
Loading…
Reference in New Issue
Block a user