From 4597f98abe32818c8d8ec1d69654b8af9a68ece2 Mon Sep 17 00:00:00 2001 From: Andrew Twyman Date: Wed, 18 May 2016 18:31:52 -0700 Subject: [PATCH] Fix sign comparison warnings, and parser confusion --- test.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test.cpp b/test.cpp index b1b52fd..3425f80 100644 --- a/test.cpp +++ b/test.cpp @@ -87,6 +87,7 @@ int main(int argc, char **argv) { string failing_comment_test = R"({ /* bad comment "a": 1, + // another comment to make C parsers which don't understand raw strings happy */ })"; string err_failing_comment; @@ -209,8 +210,8 @@ int main(int argc, char **argv) { auto res = Json::parse_multi(tst.input, parser_stop_pos, err); assert(parser_stop_pos == tst.expect_parser_stop_pos); assert( - std::count_if(res.begin(), res.end(), - [](const Json& j) { return !j.is_null(); }) + (size_t)std::count_if(res.begin(), res.end(), + [](const Json& j) { return !j.is_null(); }) == tst.expect_not_empty_elms_count); if (!res.empty()) { assert(tst.expect_parse_res == res[0]);