anchor.diff:    print(x + 1);
   }
   ''');
  -    _updateAndValidate(r'''
  +    _updateAndValidate(
  +        r'''
   int f() => 0;
   main() {
     const x = f();
     print(x + 2);
   }
  -''');
  +''',
  +        expectCachePostConstantsValid: false);
     }
   
     void test_dartDoc_beforeField() {
  
positive.code:     _checkCacheEntries(analysisContext2.analysisCache);
    }
  
    static void _assertEqualToken(Token incrToken, Token fullToken) {
  //    print('[${incrToken.offset}] |$incrToken| vs. [${fullToken.offset}] |$fullToken|');
      expect(incrToken.type, fullToken.type);
      expect(incrToken.offset, fullToken.offset);
      expect(incrToken.length, fullToken.length);
      expect(incrToken.lexeme, fullToken.lexeme);
    }
  
    static void _assertEqualTokens(
        CompilationUnit incrUnit, CompilationUnit fullUnit) {
      Token incrToken = incrUnit.beginToken;
      Token fullToken = fullUnit.beginToken;
      while (incrToken.type != TokenType.EOF && fullToken.type != TokenType.EOF) {
        _assertEqualToken(incrToken, fullToken);
        // comments
        {
          Token incrComment = incrToken.precedingComments;
          Token fullComment = fullToken.precedingComments;
          while (true) {
            if (fullComment == null) {
              expect(incrComment, isNull);
              break;
            }
            expect(incrComment, isNotNull);
            _assertEqualToken(incrComment, fullComment);
            incrComment = incrComment.next;
            fullComment = fullComment.next;
          }
        }
        // next tokens
        incrToken = incrToken.next;
        fullToken = fullToken.next;
      }
    }
  
negative.code:   print(123);
    A.b;
  }
  ''');
    }
  
    void test_hasElementAfter_defaultParameter() {
      _resolveUnit(r'''
  main() {
    print(1);
  }
  otherFunction([p = 0]) {}
  ''');
      _updateAndValidate(r'''
  main() {
    print(2);
  }
  otherFunction([p = 0]) {}
  ''');
    }
  
  