Fix two more unit tests
This commit is contained in:
parent
9a7e2131a1
commit
eb63ce1d04
2 changed files with 4 additions and 2 deletions
|
@ -56,7 +56,7 @@ merge_test() ->
|
|||
|
||||
|
||||
self() ! {step, {self(), none}, 2000000000},
|
||||
{Time,{ok,Count}} = timer:tc(hanoi_merger, merge, ["test1", "test2", "test3", 10000, true]),
|
||||
{Time,{ok,Count}} = timer:tc(hanoi_merger, merge, ["test1", "test2", "test3", 10000, true, []]),
|
||||
|
||||
error_logger:info_msg("time to merge: ~p/sec (time=~p, count=~p)~n", [1000000/(Time/Count), Time/1000000, Count]),
|
||||
|
||||
|
|
|
@ -335,7 +335,9 @@ test_tree() ->
|
|||
run_fold(Tree,From,To) ->
|
||||
{_, Count} = hanoi:fold_range(Tree,
|
||||
fun(<<N:128>>,_Value, {N, C}) ->
|
||||
{N + 1, C + 1}
|
||||
{N + 1, C + 1};
|
||||
(<<1501:128>>,_Value, {1500, C}) ->
|
||||
{1502, C + 1}
|
||||
end,
|
||||
{From, 0},
|
||||
#btree_range{from_key= <<From:128>>, to_key= <<(To+1):128>>}),
|
||||
|
|
Loading…
Reference in a new issue