klyn.unittest.Assert.assertThrows
method
public static assertThrows<TYPE = Exception>(block as Object) as Void:
DescriptionVerifies that executing the lambda raises an exception.
When `TYPE` is omitted, any exception type is accepted.
When `TYPE` is provided, the raised exception must match it.
import klyn.unittest
Assert.assertThrows(lambda (): Int("abc"))
Assert.assertThrows<TypeError>(lambda (): Char(-1))