function assertCoordinateApprox(x, y, delta, coord) {
  assertTrue(
      `Expected x: ${x}, actual x: ` + coord.x,
      coord.x >= x - delta && coord.x <= x + delta);
  assertTrue(
      `Expected y: ${y}, actual y: ` + coord.y,
      coord.y >= y - delta && coord.y <= y + delta);
}
Asserts that the coordinate is approximately equal to the given
x and y coordinates, give or take delta.