EngineOfDarkness / Stalker-Anomaly-Ltx-Loader

A Lua Script based Solution to change Vanilla Stalker Anomaly LTX Files
GNU General Public License v3.0
4 stars 0 forks source link

Perhaps switch back to use luas assert() function when creating "objects" #7

Open EngineOfDarkness opened 3 years ago

EngineOfDarkness commented 3 years ago

While exploring #4 I noticed that using "printe" in some validation functions (provided by _g.script) isn't really good when testing - I have to "mock" the function and write the incoming messages into a table I can check in my tests.

LuaUnit seems to provide functions to work with assert, so perhaps I should switch back to it.

I should then investigate handling errors with pcall or xpcall to output errors into the console of stalker.