Skip to content

Commit

Permalink
Fixed issue #255
Browse files Browse the repository at this point in the history
  • Loading branch information
danielaparker committed Jul 2, 2020
1 parent 3adaee8 commit aa4b107
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions tests/src/jsonpath/jsonpath_flatten_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,6 @@ namespace {
CHECK(value == matched_value);
}

void compare_paths(jsoncons::json& flat_doc, jsoncons::json& doc)
{
for (const auto& member : flat_doc.object_range())
{
const auto& path = member.key();
const auto& value = member.value().as<std::string>();
compare_match(doc, path, value);
}
}

} // namespace

TEST_CASE("jsonpath flatten escape")
Expand All @@ -151,5 +141,10 @@ TEST_CASE("jsonpath flatten escape")

auto flat_doc = jsoncons::jsonpath::flatten(doc);

compare_paths(flat_doc, doc);
for (const auto& member : flat_doc.object_range())
{
const auto& path = member.key();
const auto& value = member.value().as<std::string>();
compare_match(doc, path, value);
}
}

0 comments on commit aa4b107

Please sign in to comment.