Skip to content

Commit 6fc85a6

Browse files
committed
Clean up, check first/last items explicitly
1 parent d60ca79 commit 6fc85a6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/structures/enum_attrs.lua

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ end
1212
function test.valid_items()
1313
for i in ipairs(df.item_type) do
1414
check_valid_attr_entry(df.item_type, i)
15-
-- expect.true_(df.item_type.attrs[i])
16-
-- expect.true_(df.item_type._attr_entry_type:is_instance(df.item_type.attrs[i]))
1715
end
16+
check_valid_attr_entry(df.item_type, df.item_type._first_item)
17+
check_valid_attr_entry(df.item_type, df.item_type._last_item)
1818
end
1919

2020
function test.valid_items_name()
@@ -62,7 +62,7 @@ function test.pairs()
6262
break
6363
end
6464
end
65-
expect.eq(i, 0)
65+
expect.eq(i, 0, 'pairs() returned wrong number of items')
6666
end
6767

6868
function test.ipairs()
@@ -79,5 +79,5 @@ function test.ipairs()
7979
expect.eq(value, df.item_type.attrs[i + df.item_type._first_item],
8080
'ipairs() returned incorrect attrs for item at index: ' .. tostring(index))
8181
end
82-
expect.eq(i, max_attrs_length(df.item_type))
82+
expect.eq(i, max_attrs_length(df.item_type), 'ipairs() returned wrong number of items')
8383
end

0 commit comments

Comments
 (0)