diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-06-19 18:39:03 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-06-19 18:40:56 -0700 |
commit | 759cfa2ee92cef2834d6cbf95bf69eef0bbe02b1 (patch) | |
tree | 334b116242de5814d738567b8886da32f7653507 /tests/lua/binarytrees.lua | |
parent | 635420dac1eae4970a506ab8805500d73f6266a2 (diff) |
move lua binarytree args handling into lua script
Diffstat (limited to 'tests/lua/binarytrees.lua')
-rw-r--r-- | tests/lua/binarytrees.lua | 17 |
1 files changed, 16 insertions, 1 deletions
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 |