mirror of
https://github.com/ToruNiina/toml11.git
synced 2024-11-12 15:50:07 +00:00
add some tests
This commit is contained in:
parent
e35e620812
commit
13a13070c6
@ -413,8 +413,7 @@ BOOST_AUTO_TEST_CASE(test_array)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_table)
|
||||
BOOST_AUTO_TEST_CASE(test_inline_table)
|
||||
{
|
||||
using is_valid = toml::is_inline_table<char>;
|
||||
{
|
||||
@ -435,6 +434,16 @@ BOOST_AUTO_TEST_CASE(test_table)
|
||||
const std::string tab7("{hoge = 1, piyo = 2, fuga = 3, }");
|
||||
BOOST_CHECK(is_valid::invoke(tab7.cbegin()) == tab7.cend());
|
||||
}
|
||||
{
|
||||
const std::string tab0("{hoge = [1,2,3], piyo = {fuga = {}}}");
|
||||
BOOST_CHECK(is_valid::invoke(tab0.cbegin()) == tab0.cend());
|
||||
const std::string tab1("{hoge = \"}\", piyo = \"#\"}");
|
||||
BOOST_CHECK(is_valid::invoke(tab1.cbegin()) == tab1.cend());
|
||||
}
|
||||
{
|
||||
const std::string tab0("{hoge = \"}\",\n piyo = \"#\"}");
|
||||
BOOST_CHECK(is_valid::invoke(tab0.cbegin()) == tab0.cbegin());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user