X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Ftest%2FJsonTest.cpp;h=ef66acee7e60a74f71cbd0002cbd954d50df7218;hb=22286705a74596d98b2bf200cef47afb3571844e;hp=b31653080ca09a3408e32a600498c8b26b9d0af6;hpb=a4c90474ff595398d94043f386634befa3ef4728;p=folly.git diff --git a/folly/test/JsonTest.cpp b/folly/test/JsonTest.cpp index b3165308..ef66acee 100644 --- a/folly/test/JsonTest.cpp +++ b/folly/test/JsonTest.cpp @@ -317,7 +317,7 @@ TEST(Json, UTF8Validation) { TEST(Json, ParseNonStringKeys) { // test string keys - EXPECT_EQ("a", parseJson("{\"a\":[]}").items().begin().first.asString()); + EXPECT_EQ("a", parseJson("{\"a\":[]}").items().begin()->first.asString()); // check that we don't allow non-string keys as this violates the // strict JSON spec (though it is emitted by the output of @@ -329,16 +329,16 @@ TEST(Json, ParseNonStringKeys) { opts.allow_non_string_keys = true; auto val = parseJson("{1:[]}", opts); - EXPECT_EQ(1, val.items().begin().first.asInteger()); + EXPECT_EQ(1, val.items().begin()->first.asInt()); // test we can still read in strings auto sval = parseJson("{\"a\":[]}", opts); - EXPECT_EQ("a", sval.items().begin().first.asString()); + EXPECT_EQ("a", sval.items().begin()->first.asString()); // test we can read in doubles auto dval = parseJson("{1.5:[]}", opts); - EXPECT_EQ(1.5, dval.items().begin().first.asDouble()); + EXPECT_EQ(1.5, dval.items().begin()->first.asDouble()); } BENCHMARK(jsonSerialize, iters) {