couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [2/6] jiffy commit: updated refs/heads/master to 02e308c
Date Wed, 01 Nov 2017 19:31:16 GMT
Add tests for deduplication in child objects


Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/c6828729
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/c6828729
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/c6828729

Branch: refs/heads/master
Commit: c68287297b1b78387aa6e5e078c1e5f4766bdb6f
Parents: 6da61bb
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Tue Oct 31 12:10:49 2017 -0500
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Tue Oct 31 12:10:49 2017 -0500

----------------------------------------------------------------------
 test/jiffy_16_dedupe_keys_tests.erl | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/c6828729/test/jiffy_16_dedupe_keys_tests.erl
----------------------------------------------------------------------
diff --git a/test/jiffy_16_dedupe_keys_tests.erl b/test/jiffy_16_dedupe_keys_tests.erl
index a17c474..18b5394 100644
--- a/test/jiffy_16_dedupe_keys_tests.erl
+++ b/test/jiffy_16_dedupe_keys_tests.erl
@@ -33,6 +33,16 @@ dedupe_keys_test_() ->
             {[{<<"foo">>, 1}, {<<"foo">>, 2}, {<<"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
         {
             {[{<<"foo\\u0000bar">>, 1}, {<<"foo\\u0000baz">>, 2}]},


Mime
View raw message