The value used during the assertion.
The error message to display.
The file name where the error occurred. The value is added automatically at the call site.
The line where the error occurred. The value is added automatically at the call site.
DUnitAssertError if the assertation fails.
1 1.assertType!(int)(); 2 "foo".assertType!(string)(); 3 ["bar"].assertType!(string[])(); 4 ['a'].assertType!(char[])(); 5 6 // Assert a DUnitAssertError is thrown if assertType fails. 7 false.assertType!(string)().assertThrow!(DUnitAssertError)("Failed asserting type");
Assert that a value is of a particular type.