The value used during the assertion.
The prefix to match.
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 "foo bar".assertStartsWith("foo"); 2 "baz qux".assertStartsWith("baz"); 3 4 // Assert a DUnitAssertError is thrown if assertStartsWith fails. 5 "foo bar".assertStartsWith("baz").assertThrow!(DUnitAssertError)("Failed asserting starts with");
Assert that a string starts with a particular string.