expect<T> function

void expect<T>(
  1. T expected,
  2. void block(), {
  3. String? message,
})

Asserts that given function block returns the given expected value and use the given message if it fails.

Implementation

Unit expect<T>(
  T expected,
  Unit Function() block, {
  String? message,
}) {
  t.test(message, block);
}