assertGreaterOrEqual method
Asserts that this number is greater than or equal to value
.
Throws a test failure if this number is not greater than or equal to value
.
Example:
5.assertGreaterOrEqual(5); // Passes (equal)
6.assertGreaterOrEqual(5); // Passes (greater)
4.assertGreaterOrEqual(5); // Fails
value
: The value to compare against.message
: Optional custom message for the failure reason.
Implementation
void assertGreaterOrEqual(num value, {String? message}) {
expect(this >= value, isTrue,
reason:
message ?? 'Expected $this to be greater than or equal to $value');
}