Test
annotationin packageklyn.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. With @Case or @Cases, each argument row is executed and reported independently; timeout and expected-exception settings apply to each row.

Example
public class MyTestClass:
    @Test(timeout=1000, expected=ValueException)
    public 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.