summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2009-09-15 10:39:08 +0000
committerJan Lehnardt <jan@apache.org>2009-09-15 10:39:08 +0000
commitf96fee2d02a222395909810b3741400f2c9652be (patch)
tree6bd1b78cd44f5912c7087fe11fabfb10262291a1 /test
parent9808187051ceaa58e312c32eb3911b4381c7a4d1 (diff)
update etap tests to reflect changes in couch_btree, patch by Bob Dionne, closes COUCHDB-503
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@815266 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rwxr-xr-xtest/etap/021-btree-reductions.t16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/etap/021-btree-reductions.t b/test/etap/021-btree-reductions.t
index e4bc7a88..875c4677 100755
--- a/test/etap/021-btree-reductions.t
+++ b/test/etap/021-btree-reductions.t
@@ -63,7 +63,7 @@ test()->
(_) ->
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 @@ test()->
(_) ->
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 @@ test()->
(_) ->
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 @@ test()->
(_) ->
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 @@ test()->
({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 @@ test()->
({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 @@ test()->
({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 @@ test()->
(_) ->
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."
),