anchor.diff:  
   void f() {
     B.named(); // ref
  +  B.named;
   }
   ''');
   
  
positive.code:     await _verifyReferences(element, expected);
    }
  
    test_searchReferences_ConstructorElement_default() async {
      await resolveTestCode('''
  class A {
    A() {}
  }
  main() {
    new A();
  }
  ''');
      var element = findElement.unnamedConstructor('A');
      var main = findElement.function('main');
      var expected = [
        _expectIdQ(main, SearchResultKind.REFERENCE, '();', length: 0)
      ];
      await _verifyReferences(element, expected);
    }
  
    test_searchReferences_ConstructorElement_default_otherFile() async {
      String other = convertPath('$testPackageLibPath/other.dart');
      String otherCode = '''
  import 'test.dart';
  main() {
    new A(); // in other
  }
  ''';
      newFile(other, content: otherCode);
      driver.addFile(other);
  
      await resolveTestCode('''
  class A {
    A() {}
  }
  ''');
      var element = findElement.unnamedConstructor('A');
  
      var otherUnitResult = await driver.getResult2(other) as ResolvedUnitResult;
      CompilationUnit otherUnit = otherUnitResult.unit;
      Element main = otherUnit.declaredElement!.functions[0];
      var expected = [
        ExpectedResult(main, SearchResultKind.REFERENCE,
            otherCode.indexOf('(); // in other'), 0,
            isResolved: true, isQualified: true)
      ];
      await _verifyReferences(element, expected);
    }
  
    test_searchReferences_ConstructorElement_named() async {
      await resolveTestCode('''
  class A {
    A.named() {}
  }
  main() {
    new A.named();
  }
  ''');
      var element = findElement.constructor('named');
      var main = findElement.function('main');
      var expected = [
        _expectIdQ(main, SearchResultKind.REFERENCE, '.named();',
            length: '.named'.length)
      ];
      await _verifyReferences(element, expected);
    }
  
negative.code:     await _verifyReferences(element, [
        _expectIdQ(f, SearchResultKind.REFERENCE, '.named(); // ref',
            length: '.named'.length),
        _expectIdQ(f, SearchResultKind.REFERENCE, '.named;',
            length: '.named'.length),
      ]);
    }
  
    test_searchReferences_ConstructorElement_unnamed() async {
      await resolveTestCode('''
  class A {
    A() {}
  }
  
  void main() {
    A();
    A.new;
  }
  ''');
      var element = findElement.unnamedConstructor('A');
      var main = findElement.function('main');
      var expected = [
        _expectIdQ(main, SearchResultKind.REFERENCE, '();', length: 0),
        _expectIdQ(main, SearchResultKind.REFERENCE, '.new;',
            length: '.new'.length),
      ];
      await _verifyReferences(element, expected);
    }
  
    test_searchReferences_ConstructorElement_unnamed_otherFile() async {
      String other = convertPath('$testPackageLibPath/other.dart');
      String otherCode = '''
  import 'test.dart';
  
  void f() {
    A(); // in other
  }
  ''';
      newFile(other, content: otherCode);
      driver.addFile(other);
  
      await resolveTestCode('''
  class A {
    A() {}
  }
  ''');
      var element = findElement.unnamedConstructor('A');
  
      var otherUnitResult = await driver.getResult2(other) as ResolvedUnitResult;
      CompilationUnit otherUnit = otherUnitResult.unit;
      Element main = otherUnit.declaredElement!.functions[0];
      var expected = [
        ExpectedResult(main, SearchResultKind.REFERENCE,
            otherCode.indexOf('(); // in other'), 0,
            isResolved: true, isQualified: true)
      ];
      await _verifyReferences(element, expected);
    }
  
    test_searchReferences_ConstructorElement_unnamed_synthetic() async {
      await resolveTestCode('''
  class A {}
  
  void main() {
    A();
    A.new;
  }
  ''');
      var element = findElement.unnamedConstructor('A');
      var main = findElement.function('main');
      var expected = [
        _expectIdQ(main, SearchResultKind.REFERENCE, '();', length: 0),
        _expectIdQ(main, SearchResultKind.REFERENCE, '.new;',
            length: '.new'.length),
      ];
      await _verifyReferences(element, expected);
    }
  