From f6fe6fbd669ab3f5e330338e430e52d211e59183 Mon Sep 17 00:00:00 2001 From: lethosor Date: Sat, 19 Jun 2021 02:24:47 -0400 Subject: [PATCH] Clean up, check first/last items explicitly --- test/structures/enum_attrs.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/structures/enum_attrs.lua b/test/structures/enum_attrs.lua index 967d33c3b2d..ff1e28aee1f 100644 --- a/test/structures/enum_attrs.lua +++ b/test/structures/enum_attrs.lua @@ -12,9 +12,9 @@ end function test.valid_items() for i in ipairs(df.item_type) do check_valid_attr_entry(df.item_type, i) - -- expect.true_(df.item_type.attrs[i]) - -- expect.true_(df.item_type._attr_entry_type:is_instance(df.item_type.attrs[i])) end + check_valid_attr_entry(df.item_type, df.item_type._first_item) + check_valid_attr_entry(df.item_type, df.item_type._last_item) end function test.valid_items_name() @@ -62,7 +62,7 @@ function test.pairs() break end end - expect.eq(i, 0) + expect.eq(i, 0, 'pairs() returned wrong number of items') end function test.ipairs() @@ -79,5 +79,5 @@ function test.ipairs() expect.eq(value, df.item_type.attrs[i + df.item_type._first_item], 'ipairs() returned incorrect attrs for item at index: ' .. tostring(index)) end - expect.eq(i, max_attrs_length(df.item_type)) + expect.eq(i, max_attrs_length(df.item_type), 'ipairs() returned wrong number of items') end