From 1014c41db690247692dc9b5ebe0394e0a4722bf7 Mon Sep 17 00:00:00 2001 From: lethosor Date: Mon, 5 Jul 2021 20:49:25 -0400 Subject: [PATCH] Add context to some loops in tests --- test/library/gui/dwarfmode.lua | 2 +- test/structures/other_vectors.lua | 2 +- test/structures/primitive_refs.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/library/gui/dwarfmode.lua b/test/library/gui/dwarfmode.lua index 3312050ba..dc0dee18c 100644 --- a/test/library/gui/dwarfmode.lua +++ b/test/library/gui/dwarfmode.lua @@ -68,7 +68,7 @@ function test.enterSidebarMode() -- verify that all supported modes lead where we say they'll go for k,v in pairs(guidm.SIDEBAR_MODE_KEYS) do guidm.enterSidebarMode(k) - expect.eq(k, df.global.ui.main.mode) + expect.eq(k, df.global.ui.main.mode, df.ui_sidebar_mode[k]) end -- end test back in default so the test harness doesn't have to autocorrect guidm.enterSidebarMode(df.ui_sidebar_mode.Default) diff --git a/test/structures/other_vectors.lua b/test/structures/other_vectors.lua index 0fb1a9630..b913fcb0c 100644 --- a/test/structures/other_vectors.lua +++ b/test/structures/other_vectors.lua @@ -12,7 +12,7 @@ end function test.index_id() for i in ipairs(df.units_other_id) do - expect.eq(df.global.world.units.other[i]._kind, 'container') + expect.eq(df.global.world.units.other[i]._kind, 'container', df.units_other_id[i]) end end diff --git a/test/structures/primitive_refs.lua b/test/structures/primitive_refs.lua index 13bd3ed90..74abd02b9 100644 --- a/test/structures/primitive_refs.lua +++ b/test/structures/primitive_refs.lua @@ -70,7 +70,7 @@ function test.index_write_multi() x[i] = i * i end for i = 0, len - 1 do - expect.eq(x[i], i * i) + expect.eq(x[i], i * i, i) end end) end