anchor.diff:   */
   class ConstantEvaluationValidator_ForTest
       implements ConstantEvaluationValidator {
  +  final InternalAnalysisContext context;
     ConstantValueComputer computer;
  -
     ConstantEvaluationTarget _nodeBeingEvaluated;
  +
  +  ConstantEvaluationValidator_ForTest(this.context);
   
     @override
     void beforeComputeValue(ConstantEvaluationTarget constant) {
  
positive.code:   }
  
    void test_computeValues_value_depends_on_enum() {
      Source librarySource = addSource('''
  enum E { id0, id1 }
  const E e = E.id0;
  ''');
      LibraryElement libraryElement = resolve2(librarySource);
      CompilationUnit unit =
          analysisContext.resolveCompilationUnit(librarySource, libraryElement);
      expect(unit, isNotNull);
      ConstantValueComputer computer = _makeConstantValueComputer();
      computer.add(unit, librarySource, librarySource);
      computer.computeValues();
      TopLevelVariableDeclaration declaration = unit.declarations
          .firstWhere((member) => member is TopLevelVariableDeclaration);
  
negative.code:   }
  
    @override
    void beforeGetConstantInitializers(ConstructorElement constructor) =>
        _checkPathTo(constructor);
  
    @override
    void beforeGetEvaluationResult(ConstantEvaluationTarget constant) =>
        _checkPathTo(constant);
  
    @override
    void beforeGetFieldEvaluationResult(FieldElementImpl field) =>
        _checkPathTo(field);
  
    @override
    void beforeGetParameterDefault(ParameterElement parameter) =>
        _checkPathTo(parameter);
  
    void _checkPathTo(ConstantEvaluationTarget target) {
      if (computer.referenceGraph.containsPath(_nodeBeingEvaluated, target)) {
        return; // pass
      }
      // print a nice error message on failure
      StringBuffer out = new StringBuffer();
      out.writeln("missing path in constant dependency graph");
      out.writeln("from $_nodeBeingEvaluated to $target");
      for (var s in context.analysisCache.sources) {
        String text = context.getContents(s).data;
        if (text != "") {
          out.writeln('''
  === ${s.shortName}
  $text''');
        }
      }
      fail(out.toString());
    }
  }
  
  