Skip to content

Commit

Permalink
Add some more test JSONs for lists and objects containing only strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
phad committed Nov 26, 2015
1 parent a1102d4 commit 9a4baed
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions objecthash_test.c
Expand Up @@ -36,8 +36,18 @@ static void run_test(const char * const json, const char * const h) {
}

int main(int argc, char **argv) {
run_test("[]",
"acac86c0e609ca906f632b0e2dacccb2b77d22b0621f20ebece1a4835b93f6f0");
run_test("[\"foo\"]",
"268bc27d4974d9d576222e4cdbb8f7c6bd6791894098645a19eeca9c102d0964");
run_test("[\"foo\", \"bar\"]",
"32ae896c413cfdc79eec68be9139c86ded8b279238467c216cf2bec4d5f1e4a2");
run_test("{}",
"18ac3e7343f016890c510e93f935261169d9e3f565436429830faf0934f4f8e4");
run_test("{\"foo\": \"bar\"}\"",
"7ef5237c3027d6c58100afadf37796b3d351025cf28038280147d42fdc53b960");
run_test("{\"foo\": [\"bar\", \"baz\"], \"qux\": [\"norf\"]}",
"f1a9389f27558538a064f3cc250f8686a0cebb85f1cab7f4d4dcc416ceda3c92");
run_test("[\"foo\", {\"bar\": [\"baz\", null, 1.0, 1.5, 0.0001, 1000.0, 2.0, -23.1234, 2.0]}]",
"783a423b094307bcb28d005bc2f026ff44204442ef3513585e7e73b66e3c2213");
run_test("[\"foo\", {\"bar\": [\"baz\", null, 1, 1.5, 0.0001, 1000, 2, -23.1234, 2]}]",
Expand Down

0 comments on commit 9a4baed

Please sign in to comment.