📖 Read the detailed guide for hand-written examples and background.
public function test()
Functions annotated with @Test can be executed as unit tests.
public function println(string msg)
public function testFail(string msg)
public function testSuccess()
public function assertTrue(boolean b)
Asserts that this booleans is true. If it is not, an error is thrown.
public function assertTrue(boolean b, string msg)
Asserts that this booleans is true. If it is not, an error is thrown with the supplied message.
public function assertNotNull<T>(T t)
Asserts that the reference t is not null
public function int.assertEquals(int expected)
Asserts that two ints are equal. If they are not, an error is thrown with a message.
public function int.assertGreaterThan(int less)
Asserts that the passed int is greater than the parameter. If they are not, an error is thrown with a message.
public function int.assertGreaterThanOrEqual(int less)
Asserts that the passed int is greater than the parameter. If they are not, an error is thrown with a message.
public function int.assertLessThan(int greater)
Asserts that the passed int is greater than the parameter. If they are not, an error is thrown with a message.
public function int.assertLessThanOrEqual(int greater)
Asserts that the passed int is greater than the parameter. If they are not, an error is thrown with a message.
public function string.assertEquals(string expected)
Asserts that two strings are equal. If they are not, an error is thrown with a message.
public function real.assertEquals(real expected)
Asserts that two reals are equal. If they are not, an error is thrown with a message.
public function real.assertGreaterThan(real less)
Asserts that the passed real is greater than the parameter. If they are not, an error is thrown with a message.
public function real.assertGreaterThanOrEqual(real less)
Asserts that the passed real is greater than the parameter. If they are not, an error is thrown with a message.
public function real.assertLessThan(real greater)
Asserts that the passed real is greater than the parameter. If they are not, an error is thrown with a message.
public function real.assertLessThanOrEqual(real greater)
Asserts that the passed real is greater than the parameter. If they are not, an error is thrown with a message.
public function real.assertEquals(real expected, real delta)
Asserts that two reals are equal to within a positive delta. If they are not, an error is thrown with a message.
public function boolean.assertEquals(boolean expected)
Asserts that two booleans are equal. If they are not, an error is thrown with a message.
public function boolean.assertTrue()
Asserts that this booleans is true. If it is not, an error is thrown with a message.
public function boolean.assertFalse()
Asserts that this booleans is false. If it is not, an error is thrown with a message.