The array to interogate.
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 int[string] associativeArray; 2 int[] dynamicArray; 3 string string_; 4 5 associativeArray.assertEmpty(); 6 dynamicArray.assertEmpty(); 7 string_.assertEmpty(); 8 [].assertEmpty(); 9 10 // Assert a DUnitAssertError is thrown if assertEmpty fails. 11 [1].assertEmpty().assertThrow!(DUnitAssertError)("Failed asserting empty array");
Assert that an array is empty.