Add context to some loops in tests

develop
lethosor 2021-07-05 20:49:25 -04:00
parent 898d4621da
commit 1014c41db6
No known key found for this signature in database
GPG Key ID: 76A269552F4F58C1
3 changed files with 3 additions and 3 deletions

@ -68,7 +68,7 @@ function test.enterSidebarMode()
-- verify that all supported modes lead where we say they'll go -- verify that all supported modes lead where we say they'll go
for k,v in pairs(guidm.SIDEBAR_MODE_KEYS) do for k,v in pairs(guidm.SIDEBAR_MODE_KEYS) do
guidm.enterSidebarMode(k) 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
-- end test back in default so the test harness doesn't have to autocorrect -- end test back in default so the test harness doesn't have to autocorrect
guidm.enterSidebarMode(df.ui_sidebar_mode.Default) guidm.enterSidebarMode(df.ui_sidebar_mode.Default)

@ -12,7 +12,7 @@ end
function test.index_id() function test.index_id()
for i in ipairs(df.units_other_id) do 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
end end

@ -70,7 +70,7 @@ function test.index_write_multi()
x[i] = i * i x[i] = i * i
end end
for i = 0, len - 1 do for i = 0, len - 1 do
expect.eq(x[i], i * i) expect.eq(x[i], i * i, i)
end end
end) end)
end end