Skip to content
Snippets Groups Projects
Commit f9d53419 authored by Aikawa Yataro's avatar Aikawa Yataro Committed by Milo Yip
Browse files

Add Hasher tests for objects where key eq value

parent 6f79698b
Branches
No related tags found
No related merge requests found
......@@ -99,6 +99,9 @@ TEST(SchemaValidator, Hasher) {
TEST_HASHER("{\"a\":1}", "{\"a\":1}", true);
TEST_HASHER("{\"a\":1}", "{\"b\":1}", false);
TEST_HASHER("{\"a\":1}", "{\"a\":2}", false);
TEST_HASHER("{\"a\":\"a\"}", "{\"b\":\"b\"}", false); // Key equals value hashing
TEST_HASHER("{\"a\":\"a\", \"b\":\"b\"}", "{\"c\":\"c\", \"d\":\"d\"}", false);
TEST_HASHER("{\"a\":\"a\"}", "{\"b\":\"b\", \"c\":\"c\"}", false);
TEST_HASHER("{\"a\":1, \"b\":2}", "{\"b\":2, \"a\":1}", true); // Member order insensitive
TEST_HASHER("{}", "null", false);
TEST_HASHER("{}", "false", false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment