From 759cfa2ee92cef2834d6cbf95bf69eef0bbe02b1 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 19 Jun 2013 18:39:03 -0700 Subject: move lua binarytree args handling into lua script --- tests/lua/binarytrees.lua | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'tests/lua') diff --git a/tests/lua/binarytrees.lua b/tests/lua/binarytrees.lua index 2ae3dd69..58c0ce87 100644 --- a/tests/lua/binarytrees.lua +++ b/tests/lua/binarytrees.lua @@ -21,7 +21,22 @@ local function ItemCheck(tree) end end -local N = tonumber(arg and arg[1]) or 0 +local N = tonumber(arg and arg[1]) or 4 + +if N == 0 then + N = 0 +elseif N == 1 then + N = 9.5 +elseif N == 2 then + N = 11.99 +elseif N == 3 then + N = 12.85 +elseif N == 4 then + N = 14.72 +elseif N == 5 then + N = 15.82 +end + local mindepth = 4 local maxdepth = mindepth + 2 if maxdepth < N then maxdepth = N end -- cgit v1.2.3-70-g09d2