Test
annotation in package klyn.unittest

    public annotation Test:

Test

Annotation to mark a method as a test case.

A timeout of `0u` disables the limit. A timed test that exceeds its limit is interrupted, reported as failed, and cannot satisfy `expected`.

Example

    public class MyTestClass:
    @Test(timeout=1000, expected=ValueException)
    public method testMethod():
    # Test code here

Properties

Modifier and Type | Member | Description
--- | --- | ---
public readonly property | expected `expected as Type = null` | Exception type expected from the test.
public readonly property | timeout `timeout as ULong = 0u` | Maximum execution time in milliseconds.

Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | Test `Test(timeout as ULong = 0u, expected as Type = null):` | Creates test metadata.