30log icon indicating copy to clipboard operation
30log copied to clipboard

test('__ipairs is supported') are unassertive on travis's Lua 5.3 environment

Open cpeosphoros opened this issue 7 years ago • 2 comments

They pass on 5.2.

I've noticed this on my fork, but it happens with pure 30log, too. I couldn't find the reason for that, though.

cpeosphoros avatar Aug 05 '17 15:08 cpeosphoros

The __pairs and __ipairs tests iterate tables with next and expect a particular sequence of values. The problem is next doesn't iterate in a predictable order, like pairs. If those tests pass reliably in any version of Lua, it's only by accident.

airstruck avatar Aug 06 '17 17:08 airstruck

Indeed.

While working in https://github.com/cpeosphoros/30log-plus I've got a couple of situations where code fails in production but passes the tests (not specifically this pairs/ipairs test harness).

I'm working on rewriting/complementing some of the tests and will PR here the ones relative to situations where behavior is not purposely changed in 30log-plus.

cpeosphoros avatar Aug 07 '17 15:08 cpeosphoros