assertForegroundColor method

void assertForegroundColor(
  1. int x,
  2. int y,
  3. Color expected
)

Implementation

void assertForegroundColor(int x, int y, Color expected) {
  final actual = foregroundColorAt(x, y);
  if (actual != expected) {
    throw AssertionError(
      'Foreground color at ($x, $y) does not match:\n  Expected: $expected\n  Actual:   $actual',
    );
  }
}