public annotation 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.
public class MyTestClass:
@Test(timeout=1000, expected=ValueException)
public testMethod():
# Test code here| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | expectedexpected as Type = null |
Exception type expected from the test. |
| public readonly property | timeouttimeout as ULong = 0u |
Maximum execution time in milliseconds. |