lunarmodules / luassert

Assertion library for Lua
MIT License
202 stars 77 forks source link

point to failed assertion instead of to luassert files #4

Closed Tieske closed 12 years ago

Tieske commented 12 years ago

If an assertion fails the error is now given 1 level up, so instead of pointing to 'luassert/assert.lua' (line 12 or 76). It will now point to the exact line of the assert command that failed in the testfile.

Before: Failure: ...pbox\Lua projects\lua_cliargs\specs\cliargs_spec.lua @ 43 tests the private split() function C:\Users\Public\Lua\5.1\lua\luassert\assert.lua:12: Expected objects to be the same.

After: Failure: ...pbox\Lua projects\lua_cliargs\specs\cliargs_spec.lua @ 43 tests the private split() function ...pbox\Lua projects\lua_cliargs\specs\cliargs_spec.lua:61: Expected objects to be the same.