Skip to main content

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:

  1. 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 like print('Hello World')
  2. Place the luaunit.lua that's available in the tests directory in the same folder where the Lua binaries are localized in the machine
    • As an example, if the lu54.exe is inside C:\lua, the luaunit.lua should be there as well
  3. Go to the root folder and run lua54 .\tests\unit.lua

See how to write test cases here.