File utils/test.lua

Functions

test.equals (expected, actual, message) Test if the given value matches the given expected value.
test.run (name, test_method) Runs the given method and prints a formatted information including the name.
test.start (name) Prints the given name as header.


Functions

test.equals (expected, actual, message)
Test if the given value matches the given expected value. If the values do not match, an error with the given message (if any) and an additional message containing both values will be shown. The values will be compared with ==.

Parameters

  • expected: The expected value.
  • actual: The actual value.
  • message: Optional. The additional message to be printed.
test.run (name, test_method)
Runs the given method and prints a formatted information including the name.

Parameters

  • name: The name of the method that is being run.
  • test_method: The method to run.
test.start (name)
Prints the given name as header.

Parameters

  • name: The name of the header.

Valid XHTML 1.0!