anchor.diff:        expect(namedConstructor.documentationComment, '/// A named constructor.');
       });
   
  -    test("an enhanced enum's value has a constant value implementation",
  -        () async {
  +    test('has values which have a constant value implementation', () async {
         var library = await bootPackageWithLibrary('''
   enum E {
     one.named(1),
  
positive.code:       expect(method1.documentationComment, 'Doc comment.');
      });
  
      test("an enhanced enum's instance fields are documented", () async {
        var library = await bootPackageWithLibrary('''
  enum E {
    one, two, three;
  
negative.code:       );
      });
  
      test('can have instance methods which can be referenced', () async {
        var library = await bootPackageWithLibrary('''
  enum E {
    one, two;
  
    /// Doc comment.
    static int method1(String p) => 7;
  }
  
  /// Reference to [E.method1].
  class C {}
  ''');
        var cClass = library.classes.named('C');
        expect(
          cClass.documentationAsHtml,
          '<p>Reference to <a href="$linkPrefix/E/method1.html">E.method1</a>.</p>',
        );
      });
  
      test('can have instance getters which can be referenced', () async {
        var library = await bootPackageWithLibrary('''
  enum E {
    one, two;
  
    /// A getter.
    int get x => 1;
  }
  
  /// Reference to [E.x].
  class C {}
  ''');
        var cClass = library.classes.named('C');
        expect(
          cClass.documentationAsHtml,
          '<p>Reference to <a href="$linkPrefix/E/x.html">E.x</a>.</p>',
        );
      });
  
      test('can have instance setters which can be referenced', () async {
        var library = await bootPackageWithLibrary('''
  enum E {
    one, two;
  
    /// A setter.
    set x(int value) {}
  }
  
  /// Reference to [E.x].
  class C {}
  ''');
        var cClass = library.classes.named('C');
        expect(
          cClass.documentationAsHtml,
          '<p>Reference to <a href="$linkPrefix/E/x.html">E.x</a>.</p>',
        );
      });
  
      // TODO(srawlins): Add referencing tests (`/// [Enum.method]` etc.)
      // * Add tests for referencing enum static methods, static fields.
    }, skip: !enhancedEnumsAllowed);
  }
  