Commit 123d7c89 authored by Etienne Laurin's avatar Etienne Laurin

add test for non-null-terminated token

parent 6102f0bd
......@@ -674,6 +674,9 @@ TEST(Pointer, Get) {
EXPECT_EQ(2u, unresolvedTokenIndex);
EXPECT_TRUE(Pointer("/foo/0/a").Get(d, &unresolvedTokenIndex) == 0); // "/foo/0" is an string, cannot further query
EXPECT_EQ(2u, unresolvedTokenIndex);
Pointer::Token tokens[] = { { "foo ...", 3, kPointerInvalidIndex } };
EXPECT_EQ(&d["foo"], Pointer(tokens, 1).Get(d));
}
TEST(Pointer, GetWithDefault) {
......
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