assert.same gives inconsistent results when given table arguments
nickhutchinson opened this issue · 1 comments
nickhutchinson commented
I'd argue that the check that assert.same
does for exact type equivalence for table values is unwarranted and results in some unexpected results.
Take the following LuaJIT code. 0ULL
(of type cdata) and 0
(of type number) compare equal, so I'd expect both of the following assertions to pass:
assert.same(0ULL, 0)
assert.same({0ULL}, {0})
In fact, luassert accepts the first and rejects the second.