You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2009/09/15 12:39:09 UTC
svn commit: r815266 - /couchdb/trunk/test/etap/021-btree-reductions.t
Author: jan
Date: Tue Sep 15 10:39:08 2009
New Revision: 815266
URL: http://svn.apache.org/viewvc?rev=815266&view=rev
Log:
update etap tests to reflect changes in couch_btree, patch by Bob Dionne, closes COUCHDB-503
Modified:
couchdb/trunk/test/etap/021-btree-reductions.t
Modified: couchdb/trunk/test/etap/021-btree-reductions.t
URL: http://svn.apache.org/viewvc/couchdb/trunk/test/etap/021-btree-reductions.t?rev=815266&r1=815265&r2=815266&view=diff
==============================================================================
--- couchdb/trunk/test/etap/021-btree-reductions.t (original)
+++ couchdb/trunk/test/etap/021-btree-reductions.t Tue Sep 15 10:39:08 2009
@@ -63,7 +63,7 @@
(_) ->
false
end,
- couch_btree:fold_reduce(Btree2, nil, nil, GroupFun, FoldFun, []),
+ couch_btree:fold_reduce(Btree2, FoldFun, [], [{key_group_fun, GroupFun}]),
"Reduction works with no specified direction, startkey, or endkey."
),
@@ -74,7 +74,7 @@
(_) ->
false
end,
- couch_btree:fold_reduce(Btree2, fwd, nil, nil, GroupFun, FoldFun, []),
+ couch_btree:fold_reduce(Btree2, FoldFun, [], [{key_group_fun, GroupFun}, {dir, fwd}]),
"Reducing forward works with no startkey or endkey."
),
@@ -85,7 +85,7 @@
(_) ->
false
end,
- couch_btree:fold_reduce(Btree2, rev, nil, nil, GroupFun, FoldFun, []),
+ couch_btree:fold_reduce(Btree2, FoldFun, [], [{key_group_fun, GroupFun}, {dir, rev}]),
"Reducing backwards works with no startkey or endkey."
),
@@ -96,7 +96,7 @@
(_) ->
false
end,
- couch_btree:fold_reduce(Btree2, fwd, SK1, EK2, GroupFun, FoldFun, []),
+ couch_btree:fold_reduce(Btree2, FoldFun, [], [{dir, fwd}, {key_group_fun, GroupFun}, {start_key, SK1}, {end_key, EK2}]),
"Reducing works over the entire range with startkey and endkey set."
),
@@ -105,7 +105,7 @@
({ok, [{{"even", _}, 500}]}) -> true;
(_) -> false
end,
- couch_btree:fold_reduce(Btree2, fwd, SK1, EK1, GroupFun, FoldFun, []),
+ couch_btree:fold_reduce(Btree2, FoldFun, [], [{dir, fwd}, {key_group_fun, GroupFun}, {start_key, SK1}, {end_key, EK1}]),
"Reducing foward over first half works with a startkey and endkey."
),
@@ -114,7 +114,7 @@
({ok, [{{"odd", _}, 500}]}) -> true;
(_) -> false
end,
- couch_btree:fold_reduce(Btree2, fwd, SK2, EK2, GroupFun, FoldFun, []),
+ couch_btree:fold_reduce(Btree2, FoldFun, [], [{dir, fwd}, {key_group_fun, GroupFun}, {start_key, SK2}, {end_key, EK2}]),
"Reducing foward over second half works with second startkey and endkey"
),
@@ -123,7 +123,7 @@
({ok, [{{"odd", _}, 500}]}) -> true;
(_) -> false
end,
- couch_btree:fold_reduce(Btree2, rev, EK2, SK2, GroupFun, FoldFun, []),
+ couch_btree:fold_reduce(Btree2, FoldFun, [], [{dir, rev}, {key_group_fun, GroupFun}, {start_key, EK2}, {end_key, SK2}]),
"Reducing in reverse works after swapping the startkey and endkey."
),
@@ -134,7 +134,7 @@
(_) ->
false
end,
- couch_btree:fold_reduce(Btree2, rev, EK2, SK1, GroupFun, FoldFun, []),
+ couch_btree:fold_reduce(Btree2, FoldFun, [], [{dir, rev}, {key_group_fun, GroupFun}, {start_key, EK2}, {end_key, SK1}]),
"Reducing in reverse results in reversed accumulator."
),