From e4018b3ebf7d7e14787a04420014acf581d69978 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Tue, 20 Oct 2009 11:19:41 +0200 Subject: Split debug lua bindings out to new library "debug". --- crawl-ref/source/test/findray.lua | 10 +++++----- crawl-ref/source/test/los_csc.lua | 8 ++++---- crawl-ref/source/test/los_symm.lua | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'crawl-ref/source/test') diff --git a/crawl-ref/source/test/findray.lua b/crawl-ref/source/test/findray.lua index 1b0248494b..9f66461d4e 100644 --- a/crawl-ref/source/test/findray.lua +++ b/crawl-ref/source/test/findray.lua @@ -36,7 +36,7 @@ local function test_findray() local ray = los.findray(you_x, you_y, x, y) if not ray then dgn.grid(x, y, "floor_special") - dgn.dbg_dump_map(FAILMAP) + debug.dump_map(FAILMAP) assert(false, "Can't find ray to " .. p .. " although it's in unobstructed view. (#" .. checks .. ")") @@ -52,7 +52,7 @@ local function test_findray() while(ray_p ~= p) do if dgn.is_opaque(rx, ry) then dgn.grid(x, y, "floor_special") - dgn.dbg_dump_map(FAILMAP) + debug.dump_map(FAILMAP) assert(false, "Ray from " .. you_p .. " to " .. p .. " passes through opaque cell " .. ray_p @@ -68,11 +68,11 @@ end local function run_findray_tests(depth, nlevels, tests_per_level) local place = "D:" .. depth crawl.mpr("Running find_ray tests on " .. place) - dgn.dbg_goto_place(place) + debug.goto_place(place) for lev_i = 1, nlevels do - dgn.dbg_flush_map_memory() - dgn.dbg_generate_level() + debug.flush_map_memory() + debug.generate_level() for t_i = 1, tests_per_level do test_findray() end diff --git a/crawl-ref/source/test/los_csc.lua b/crawl-ref/source/test/los_csc.lua index b54d251d8f..04a1ac2aeb 100644 --- a/crawl-ref/source/test/los_csc.lua +++ b/crawl-ref/source/test/los_csc.lua @@ -30,7 +30,7 @@ local function test_cellseecell_symmetry() end if (forward and backward) or (not forward and not backward) then dgn.grid(other_p.x, other_p.y, "floor_special") - dgn.dbg_dump_map(FAILMAP) + debug.dump_map(FAILMAP) assert(false, "cell_see_cell asymmetry detected (iter #" .. checks .. "): " .. this_p .. " sees " .. other_p .. ", but not vice versa." @@ -44,11 +44,11 @@ end local function run_los_tests(depth, nlevels, tests_per_level) local place = "D:" .. depth crawl.mpr("Running LOS tests on " .. place) - dgn.dbg_goto_place(place) + debug.goto_place(place) for lev_i = 1, nlevels do - dgn.dbg_flush_map_memory() - dgn.dbg_generate_level() + debug.flush_map_memory() + debug.generate_level() for t_i = 1, tests_per_level do test_cellseecell_symmetry() end diff --git a/crawl-ref/source/test/los_symm.lua b/crawl-ref/source/test/los_symm.lua index eac1db7577..400c4a2356 100644 --- a/crawl-ref/source/test/los_symm.lua +++ b/crawl-ref/source/test/los_symm.lua @@ -39,7 +39,7 @@ local function test_losight_symmetry() local this_p = dgn.point(x, y) local you_p = dgn.point(you_x, you_y) dgn.grid(you_x, you_y, "floor_special") - dgn.dbg_dump_map(FAILMAP) + debug.dump_map(FAILMAP) assert(false, "LOS asymmetry detected (iter #" .. checks .. "): " .. you_p .. " sees " .. this_p .. ", but not vice versa." .. @@ -51,11 +51,11 @@ end local function run_los_tests(depth, nlevels, tests_per_level) local place = "D:" .. depth crawl.mpr("Running LOS tests on " .. place) - dgn.dbg_goto_place(place) + debug.goto_place(place) for lev_i = 1, nlevels do - dgn.dbg_flush_map_memory() - dgn.dbg_generate_level() + debug.flush_map_memory() + debug.generate_level() for t_i = 1, tests_per_level do test_losight_symmetry() end -- cgit v1.2.3-54-g00ecf