assertZero method
Asserts that this number is exactly zero.
Throws a test failure if this number is not zero.
Example:
0.assertZero(); // Passes
5.assertZero(); // Fails
(-5).assertZero(); // Fails
message
: Optional custom message for the failure reason.
Implementation
void assertZero({String? message}) {
expect(this == 0, isTrue, reason: message ?? 'Expected $this to be zero');
}