anchor.diff:  
     test('receives and processes mouse hover events', () {
       final ui.PointerDataPacket packet1 = ui.PointerDataPacket(data: <ui.PointerData>[
  -      ui.PointerData(
  -        change: ui.PointerChange.hover, // Will implicitly also add a PointerAdded event.
  -        physicalX: 0.0 * ui.window.devicePixelRatio,
  -        physicalY: 0.0 * ui.window.devicePixelRatio,
  -        kind: PointerDeviceKind.mouse,
  -      ),
  +      // Will implicitly also add a PointerAdded event.
  +      _pointerData(PointerChange.hover, const Offset(0.0, 0.0)),
       ]);
       final ui.PointerDataPacket packet2 = ui.PointerDataPacket(data: <ui.PointerData>[
  -      ui.PointerData(
  -        change: ui.PointerChange.hover,
  -        physicalX: 1.0 * ui.window.devicePixelRatio,
  -        physicalY: 101.0 * ui.window.devicePixelRatio,
  -        kind: PointerDeviceKind.mouse,
  -      ),
  +      _pointerData(PointerChange.hover, const Offset(1.0, 101.0)),
       ]);
       final ui.PointerDataPacket packet3 = ui.PointerDataPacket(data: <ui.PointerData>[
  -      ui.PointerData(
  -        change: ui.PointerChange.remove,
  -        physicalX: 1.0 * ui.window.devicePixelRatio,
  -        physicalY: 201.0 * ui.window.devicePixelRatio,
  -        kind: PointerDeviceKind.mouse,
  -      ),
  +      _pointerData(PointerChange.remove, const Offset(1.0, 201.0)),
       ]);
       final ui.PointerDataPacket packet4 = ui.PointerDataPacket(data: <ui.PointerData>[
  -      ui.PointerData(
  -        change: ui.PointerChange.hover,
  -        physicalX: 1.0 * ui.window.devicePixelRatio,
  -        physicalY: 301.0 * ui.window.devicePixelRatio,
  -        kind: PointerDeviceKind.mouse,
  -      ),
  +      _pointerData(PointerChange.hover, const Offset(1.0, 301.0)),
       ]);
       final ui.PointerDataPacket packet5 = ui.PointerDataPacket(data: <ui.PointerData>[
  -      ui.PointerData(
  -        change: ui.PointerChange.hover,
  -        physicalX: 1.0 * ui.window.devicePixelRatio,
  -        physicalY: 401.0 * ui.window.devicePixelRatio,
  -        kind: PointerDeviceKind.mouse,
  -        device: 1,
  -      ),
  +      _pointerData(PointerChange.hover, const Offset(1.0, 401.0), device: 1),
       ]);
       RendererBinding.instance.mouseTracker.attachAnnotation(annotation);
       RendererBinding.instance.mouseTracker.sendMouseNotifications(<int>{0});
       isInHitRegionOne = true;
       ui.window.onPointerDataPacket(packet1);
  -    expect(enter.length, equals(1), reason: 'enter contains $enter');
  -    expect(enter.first.position, equals(const Offset(0.0, 0.0)));
  -    expect(enter.first.device, equals(0));
  -    expect(enter.first.runtimeType, equals(PointerEnterEvent));
  -    expect(exit.length, equals(0), reason: 'exit contains $exit');
  -    expect(move.length, equals(1), reason: 'move contains $move');
  -    expect(move.first.position, equals(const Offset(0.0, 0.0)));
  -    expect(move.first.device, equals(0));
  -    expect(move.first.runtimeType, equals(PointerHoverEvent));
  -    clear();
  -
  -    ui.window.onPointerDataPacket(packet2);
  -    expect(enter.length, equals(0), reason: 'enter contains $enter');
  -    expect(exit.length, equals(0), reason: 'exit contains $exit');
  -    expect(move.length, equals(1), reason: 'move contains $move');
  -    expect(move.first.position, equals(const Offset(1.0, 101.0)));
  -    expect(move.first.device, equals(0));
  -    expect(move.first.runtimeType, equals(PointerHoverEvent));
  +    expect(events, _equalToEventsOnCriticalFields(<PointerEvent>[
  +      const PointerEnterEvent(position: Offset(0.0, 0.0)),
  +      const PointerHoverEvent(position: Offset(0.0, 0.0)),
  +    ]));
  +    clear();
  +
  +    ui.window.onPointerDataPacket(packet2);
  +    expect(events, _equalToEventsOnCriticalFields(<PointerEvent>[
  +      const PointerHoverEvent(position: Offset(1.0, 101.0)),
  +    ]));
       clear();
   
       ui.window.onPointerDataPacket(packet3);
  -    expect(enter.length, equals(0), reason: 'enter contains $enter');
  -    expect(move.length, equals(1), reason: 'move contains $move');
  -    expect(move.first.position, equals(const Offset(1.0, 201.0)));
  -    expect(move.first.device, equals(0));
  -    expect(move.first.runtimeType, equals(PointerHoverEvent));
  -    expect(exit.length, equals(1), reason: 'exit contains $exit');
  -    expect(exit.first.position, equals(const Offset(1.0, 201.0)));
  -    expect(exit.first.device, equals(0));
  -    expect(exit.first.runtimeType, equals(PointerExitEvent));
  +    expect(events, _equalToEventsOnCriticalFields(<PointerEvent>[
  +      const PointerHoverEvent(position: Offset(1.0, 201.0)),
  +      const PointerExitEvent(position: Offset(1.0, 201.0)),
  +    ]));
   
       clear();
       ui.window.onPointerDataPacket(packet4);
  -    expect(enter.length, equals(1), reason: 'enter contains $enter');
  -    expect(enter.first.position, equals(const Offset(1.0, 301.0)));
  -    expect(enter.first.device, equals(0));
  -    expect(enter.first.runtimeType, equals(PointerEnterEvent));
  -    expect(exit.length, equals(0), reason: 'exit contains $exit');
  -    expect(move.length, equals(1), reason: 'move contains $move');
  -    expect(move.first.position, equals(const Offset(1.0, 301.0)));
  -    expect(move.first.device, equals(0));
  -    expect(move.first.runtimeType, equals(PointerHoverEvent));
  +    expect(events, _equalToEventsOnCriticalFields(<PointerEvent>[
  +      const PointerEnterEvent(position: Offset(1.0, 301.0)),
  +      const PointerHoverEvent(position: Offset(1.0, 301.0)),
  +    ]));
   
       // add in a second mouse simultaneously.
       clear();
       ui.window.onPointerDataPacket(packet5);
       RendererBinding.instance.mouseTracker.sendMouseNotifications(<int>{1});
  -    expect(enter.length, equals(1), reason: 'enter contains $enter');
  -    expect(enter.first.position, equals(const Offset(1.0, 401.0)));
  -    expect(enter.first.device, equals(1));
  -    expect(enter.first.runtimeType, equals(PointerEnterEvent));
  -    expect(exit.length, equals(0), reason: 'exit contains $exit');
  -    expect(move.length, equals(2), reason: 'move contains $move');
  -    expect(move.first.position, equals(const Offset(1.0, 401.0)));
  -    expect(move.first.device, equals(1));
  -    expect(move.first.runtimeType, equals(PointerHoverEvent));
  -    expect(move.last.position, equals(const Offset(1.0, 401.0)));
  -    expect(move.last.device, equals(1));
  -    expect(move.last.runtimeType, equals(PointerHoverEvent));
  +    expect(events, _equalToEventsOnCriticalFields(<PointerEvent>[
  +      const PointerEnterEvent(position: Offset(1.0, 401.0), device: 1),
  +      const PointerHoverEvent(position: Offset(1.0, 401.0), device: 1),
  +      const PointerHoverEvent(position: Offset(1.0, 401.0), device: 1),
  +    ]));
     });
   
     test('detects exit when annotated layer no longer hit', () {
       final ui.PointerDataPacket packet1 = ui.PointerDataPacket(data: <ui.PointerData>[
  -      ui.PointerData(
  -        change: ui.PointerChange.hover,
  -        physicalX: 0.0 * ui.window.devicePixelRatio,
  -        physicalY: 0.0 * ui.window.devicePixelRatio,
  -        kind: PointerDeviceKind.mouse,
  -      ),
  -      ui.PointerData(
  -        change: ui.PointerChange.hover,
  -        physicalX: 1.0 * ui.window.devicePixelRatio,
  -        physicalY: 101.0 * ui.window.devicePixelRatio,
  -        kind: PointerDeviceKind.mouse,
  -      ),
  +      _pointerData(PointerChange.hover, const Offset(0.0, 0.0)),
  +      _pointerData(PointerChange.hover, const Offset(1.0, 101.0)),
       ]);
       final ui.PointerDataPacket packet2 = ui.PointerDataPacket(data: <ui.PointerData>[
  -      ui.PointerData(
  -        change: ui.PointerChange.hover,
  -        physicalX: 1.0 * ui.window.devicePixelRatio,
  -        physicalY: 201.0 * ui.window.devicePixelRatio,
  -        kind: PointerDeviceKind.mouse,
  -      ),
  +      _pointerData(PointerChange.hover, const Offset(1.0, 201.0)),
       ]);
       isInHitRegionOne = true;
       RendererBinding.instance.mouseTracker.attachAnnotation(annotation);
  
positive.code: // found in the LICENSE file.
  
  import 'dart:ui' as ui;
  
  import 'package:flutter/cupertino.dart';
  import 'package:flutter/foundation.dart';
  
negative.code: 
      ui.window.onPointerDataPacket(packet1);
  
      expect(events, _equalToEventsOnCriticalFields(<PointerEvent>[
        const PointerEnterEvent(position: Offset(0.0, 0.0)),
        const PointerHoverEvent(position: Offset(0.0, 0.0)),
        const PointerHoverEvent(position: Offset(1.0, 101.0)),
      ]));
      // Simulate layer going away by detaching it.
      clear();
      isInHitRegionOne = false;
  
      ui.window.onPointerDataPacket(packet2);
      expect(events, _equalToEventsOnCriticalFields(<PointerEvent>[
        const PointerExitEvent(position: Offset(1.0, 201.0)),
      ]));
  
      // Actually detach annotation. Shouldn't receive hit.
      RendererBinding.instance.mouseTracker.detachAnnotation(annotation);
  