💚 fixed test case

parent 5773e164
...@@ -152,6 +152,10 @@ TEST_CASE("README", "[hide]") ...@@ -152,6 +152,10 @@ TEST_CASE("README", "[hide]")
j.push_back(1); j.push_back(1);
j.push_back(true); j.push_back(true);
// comparison
bool x = (j == "[\"foo\", 1, true]"_json); // true
CHECK(x == true);
// iterate the array // iterate the array
for (json::iterator it = j.begin(); it != j.end(); ++it) for (json::iterator it = j.begin(); it != j.end(); ++it)
{ {
...@@ -176,10 +180,6 @@ TEST_CASE("README", "[hide]") ...@@ -176,10 +180,6 @@ TEST_CASE("README", "[hide]")
j.type(); // json::value_t::array j.type(); // json::value_t::array
j.clear(); // the array is empty again j.clear(); // the array is empty again
// comparison
bool x = (j == "[\"foo\", 1, true]"_json); // true
CHECK(x == true);
// create an object // create an object
json o; json o;
o["foo"] = 23; o["foo"] = 23;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment