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