From f96fee2d02a222395909810b3741400f2c9652be Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Tue, 15 Sep 2009 10:39:08 +0000 Subject: 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 --- test/etap/021-btree-reductions.t | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test') 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." ), -- cgit v1.2.3