Assert
class in package klyn.unittest

    public class Assert:

Assert

Utility assertion helpers for the Klyn test framework.

    import klyn.unittest

    Assert.assertEquals(3, 1 + 2)
    Assert.assertTrue(2 < 3)
    Assert.assertEquals(3.14159, 3.141592, 1e-4)

Methods

Modifier and Type | Member | Description
--- | --- | ---
public static | asserEquals `asserEquals(expected as Double, actual as Double, delta as Double) as Void:` | Legacy alias for tolerant floating-point equality.
public static | asserEquals `asserEquals(expected as Float, actual as Float, delta as Float) as Void:` | Legacy alias for tolerant floating-point equality.
public static | asserEquals `asserEquals<TYPE>(expected as TYPE, actual as TYPE) as Void:` | Legacy alias for `assertEquals`.
public static | assertEquals `assertEquals(expected as Double, actual as Double, delta as Double) as Void:` | Verifies that two double values are equal within a tolerance.
public static | assertEquals `assertEquals(expected as Float, actual as Float, delta as Float) as Void:` | Verifies that two float values are equal within a tolerance.
public static | assertEquals `assertEquals<TYPE>(expected as TYPE, actual as TYPE) as Void:` | Verifies that two values are equal.
public static | assertFails `assertFails(block as Object) as Void:` | Verifies that executing the lambda raises any error.
public static | assertFalse `assertFalse(condition as Boolean) as Void:` | Verifies that a condition is false.
public static | assertNotNull `assertNotNull(value as Object) as Void:` | Verifies that a value is not null.
public static | assertNull `assertNull(value as Object) as Void:` | Verifies that a value is null.
public static | assertRaises `assertRaises(expected as Type, block as Object) as Void:` | Verifies that executing the lambda raises the expected exception type.
public static | assertThrows `assertThrows<TYPE>(block as Object) as Void:` | Verifies that executing the lambda raises an exception.
public static | assertTrue `assertTrue(condition as Boolean) as Void:` | Verifies that a condition is true.
public static | fail `fail(message as String) as Void:` | Forces the current test to fail with a message.
public static | isFalse `isFalse(condition as Boolean) as Void:` | Alias for `assertFalse`.
public static | isTrue `isTrue(condition as Boolean) as Void:` | Alias for `assertTrue`.