`annotate_overrides` test for augmented `hasOverride`

Adds a failing test for the case where a `hasOverride` getter should consider augmentations.

See: https://github.com/dart-lang/linter/issues/4925


Change-Id: I8d7e8f145d630abbef438a79076820613a801940
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364623
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
diff --git a/pkg/linter/test/rules/annotate_overrides_test.dart b/pkg/linter/test/rules/annotate_overrides_test.dart
index bd77dc8..e1bc0a4 100644
--- a/pkg/linter/test/rules/annotate_overrides_test.dart
+++ b/pkg/linter/test/rules/annotate_overrides_test.dart
@@ -17,6 +17,41 @@
   @override
   String get lintRule => 'annotate_overrides';
 
+  @FailingTest(
+    reason:
+        '`augmented.hasOverride` not implemented yet (https://github.com/dart-lang/sdk/issues/55579)',
+    issue: 'https://github.com/dart-lang/linter/issues/4925',
+  )
+  test_augmentationClass_implementsInterface() async {
+    var a = newFile('$testPackageLibPath/a.dart', r'''
+import augment 'b.dart';
+
+abstract interface class HasLength {
+  int get length;
+}
+
+class C {
+  int get length => 42;
+}
+''');
+
+    // TODO(pq): update getter to be abstract when supported.
+    var b = newFile('$testPackageLibPath/b.dart', r'''
+augment library 'a.dart';
+
+augment class C implements HasLength {
+  @override
+  augment int get length => 42;
+}
+''');
+
+    result = await resolveFile(a.path);
+    await assertNoDiagnosticsIn(errors);
+
+    result = await resolveFile(b.path);
+    await assertNoDiagnosticsIn(errors);
+  }
+
   test_augmentationClass_methodWithoutAnnotation() async {
     newFile('$testPackageLibPath/a.dart', r'''
 import augment 'test.dart';