mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-17 09:08:08 +08:00
Merge branch 'master' into v3
This commit is contained in:
@@ -12,9 +12,8 @@
|
||||
#include <deque>
|
||||
#include <array>
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_find_for_value)
|
||||
BOOST_AUTO_TEST_CASE(test_find)
|
||||
{
|
||||
// value itself is not a table
|
||||
{
|
||||
toml::value v(true);
|
||||
bool thrown = false;
|
||||
@@ -43,16 +42,6 @@ BOOST_AUTO_TEST_CASE(test_find_for_value)
|
||||
BOOST_CHECK(thrown);
|
||||
}
|
||||
|
||||
{
|
||||
toml::value v = toml::table{{"num", 42}};
|
||||
BOOST_CHECK_EQUAL(42, toml::find<int>(v, "num"));
|
||||
|
||||
// reference that can be used to modify the content
|
||||
auto& num = toml::find<toml::integer>(v, "num");
|
||||
num = 54;
|
||||
BOOST_CHECK_EQUAL(54, toml::find<int>(v, "num"));
|
||||
}
|
||||
|
||||
// recursively search tables
|
||||
{
|
||||
toml::value v = toml::table{
|
||||
|
Reference in New Issue
Block a user