From 4793d0fd340555d0dc6fed18787418c69dc60022 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 24 May 2008 13:38:18 +0000 Subject: [PATCH] more tests --- src/scripts/run-tests.lua | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/scripts/run-tests.lua b/src/scripts/run-tests.lua index f32bdda86..b9c0c08c4 100644 --- a/src/scripts/run-tests.lua +++ b/src/scripts/run-tests.lua @@ -56,12 +56,34 @@ function test_hse() write_game("50.txt.1", "text") end +function test_realloc() + local t1 = os.clock() + read_game("571.dat.2", "binary") + print(os.clock() - t1) + free_game() + print(os.clock() - t1) + -- and again + local t2 = os.clock() + read_game("571.dat.2", "binary") + print(os.clock() - t2) + free_game() + print(os.clock() - t2) +end + +function test_bmark() + local t1 = os.clock() + read_game("566.dat", "binary") + print(os.clock() - t1) +end + loadscript("default.lua") run_scripts() -- go local now = os.clock() -test_free() +-- test_free() +test_bmark() -- test_hse() +-- test_realloc() local elapsed = os.clock() - now print(elapsed) -- text: 50.574