assertLessThan method

void assertLessThan(
  1. num value, {
  2. String? message,
})

Asserts that this number is less than value.

Throws a test failure if this number is not less than value.

  • value: The value to compare against.
  • message: Optional custom message for the failure reason.

Implementation

void assertLessThan(num value, {String? message}) {
  expect(this < value, isTrue,
      reason: message ?? 'Expected $this to be less than $value');
}