Closed JackXuXin closed 5 years ago
That looks strange indeed. I'll try to have a look
I tried to reproduce your problem but did not succeed. Which version of Lua and LuaUnit are you using ? Is the content of the table really what is being displayed ?
Lua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio
> lu = require('luaunit')
> lu.assertEquals( {1}, {1.0} )
> lu.assertEquals( {a=1}, {a=1.0} )
> lu.assertEquals( 1, 2 )
stdin:1: LuaUnit test FAILURE: expected: 2, actual: 1
stack traceback:
[C]: in function 'error'
./luaunit.lua:1190: in function 'failure'
./luaunit.lua:1276: in function 'assertEquals'
stdin:1: in main chunk
[C]: in ?
> lu.assertEquals( {free=0, multiple=17}, {free=0, multiple=17.0} ) -- see, no error generated
> ^Z
$ lua51
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
> lu = require('luaunit')
> lu.assertEquals( {free=0, multiple=17}, {free=0, multiple=17.0} ) -- see, no error generated
> ^Z
$ lua53
Lua 5.3.0 Copyright (C) 1994-2015 Lua.org, PUC-Rio
> lu = require('luaunit')
> lu.assertEquals( {free=0, multiple=17}, {free=0, multiple=17.0} ) -- see, no error generated
> ^Z
$
Can you check with the master version of LuaUnit ? It could be a duplicate of #122 which I just closed.
Closing after lack of feedback and no reproducability.