Unit Suite
Lua version
For the steps below, Lua 5.4 will be used as the installed version, but the library should run well for any versions after, and including, 5.1.
How to run the unit test suite
The Stormwind Library uses the luaunit library to house the unit test suite.
In order to be able to run the unit tests suite, follow the steps below:
- Make sure Lua can be executed in a command line by following the
installation steps
- You should be able to run a command like
lua54
in your command line tool and execute any lua code likeprint('Hello World')
- You should be able to run a command like
- Place the
luaunit.lua
that's available in thetests
directory in the same folder where the Lua binaries are localized in the machine- As an example, if the
lu54.exe
is insideC:\lua
, theluaunit.lua
should be there as well
- As an example, if the
- Go to the root folder and run
lua54 .\tests\unit.lua
See how to write test cases here.