[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: assert with formatting
- From: tobias@...
- Date: Fri, 13 Jul 2018 02:11:04 +0200
Quoting Luiz Henrique de Figueiredo <email@example.com>:
Of course I could write a wrapper function which takes varargs compiles the
string and run assert on that.
However, when hooking up to the debugger it will always report the assert in
the helper function as a
location instead of the location in the unittest which is broken. It's
obviously still available in the
callstack, but it would be nicer the other way.
For that, you'll have to redefine assert to call error with the
correct stack level.
Thank you, that's something I can work with. I looked at the source
code and it
seems dirty to patch it into luaB_assert()