Test type

A test

Methods

call(t:Test) Source: autoload/globals/test.ngs:260
Run the test

Returns

Result (Success/Failure)

Example

Test("addition", { 1 + 1 })()  # <Success val=2>
init(t:Test, name:Str, body:Fun) Source: autoload/globals/test.ngs:249
Test constructor. Inside ns { }, also sets the namespace's member name to the test.

Returns

Test

Example

t = Test("addition", { assert(1 + 1, 2) })
n = ns { Test("addition", { assert(1 + 1, 2) }) }  # n.addition is the Test