added more features from master branch

This commit is contained in:
Niels 2015-02-07 15:57:47 +01:00
parent ac274dee2a
commit cf498ca4f2
4 changed files with 1261 additions and 360 deletions

View file

@ -72,6 +72,13 @@ TEST_CASE()
std::cerr << j.dump(4) << std::endl;
j["pi"] = {3, 1, 4, 1};
std::cerr << j << std::endl;
const json jc(j);
CHECK(j.find("name") != j.end());
CHECK(j.find("foo") == j.end());
CHECK(*(j.find("name")) == json("Niels") );
CHECK(jc.find("name") != jc.end());
CHECK(jc.find("foo") == jc.end());
}
{
// ways to express the empty array []