Browse Source

Add tests for deduplication in child objects

pull/158/head
Paul J. Davis 7 years ago
parent
commit
c68287297b
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      test/jiffy_16_dedupe_keys_tests.erl

+ 10
- 0
test/jiffy_16_dedupe_keys_tests.erl View File

@ -33,6 +33,16 @@ dedupe_keys_test_() ->
{[{<<"foo">>, 1}, {<<"foo">>, 2}, {<<"foo">>, 3}]}, {[{<<"foo">>, 1}, {<<"foo">>, 2}, {<<"foo">>, 3}]},
{[{<<"foo">>, 3}]} {[{<<"foo">>, 3}]}
}, },
% Sub-objects are covered
{
{[{<<"foo">>, {[{<<"bar">>, 1}, {<<"bar">>, 2}]}}]},
{[{<<"foo">>, {[{<<"bar">>, 2}]}}]}
},
% Objets in arrays are handled
{
[{[{<<"foo">>, 1}, {<<"foo">>, 2}]}],
[{[{<<"foo">>, 2}]}]
},
% Embedded NULL bytes are handled % Embedded NULL bytes are handled
{ {
{[{<<"foo\\u0000bar">>, 1}, {<<"foo\\u0000baz">>, 2}]}, {[{<<"foo\\u0000bar">>, 1}, {<<"foo\\u0000baz">>, 2}]},

Loading…
Cancel
Save