anchor.diff:  
     @override
     void registerWrite(UnspecifiedDeclaration declaration, Token token) {
  -    trace("Write to ${declaration.name}", token);
  +    // TODO(ahe): Call `note` instead to create expectations.
  +    trace("Write to ${declaration.name}@${declaration.charOffset}", token);
     }
   
     @override
     void registerPromotionCandidate(
         UnspecifiedDeclaration declaration, Token token) {
  -    trace("Possible promotion of ${declaration.name}", token);
  +    // TODO(ahe): Call `note` instead to create expectations.
  +    trace("Possible promotion of ${declaration.name}@${declaration.charOffset}",
  +        token);
     }
   
     @override
  
positive.code: // Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
  // for details. All rights reserved. Use of this source code is governed by a
  // BSD-style license that can be found in the LICENSE file.
  
  import 'package:front_end/src/base/processed_options.dart'
      show ProcessedOptions;
  
negative.code:   String toString() => "<<$name@$charOffset>>";
  }
  
  class TypePromotionResult {
    final Uri uri;
  
    final String trace;
  
    const TypePromotionResult(this.uri, this.trace);
  }
  
  class CheckTypePromotionResult
      extends Step<TypePromotionResult, Null, TypePromotionLookAheadContext> {
    const CheckTypePromotionResult();
  
    String get name => "Check Type Promotion Result";
  
    Future<Result<Null>> run(
        TypePromotionResult result, TypePromotionLookAheadContext context) async {
      Uri uri = result.uri;
      String actual = result.trace.trim();
      if (actual.isNotEmpty) {
        actual += "\n";
      }
      File expectedFile = new File("${uri.toFilePath()}.type_promotion.expect");
      if (await expectedFile.exists()) {
        String expected = await expectedFile.readAsString();
        if (expected != actual) {
          if (context.updateExpectations) {
            return updateExpectationFile(expectedFile.uri, actual);
          }
          String diff = await runDiff(expectedFile.uri, actual);
          return new Result<Null>(null, context.expectationFileMismatch,
              "$uri doesn't match ${expectedFile.uri}\n$diff", null);
        }
        return pass(null);
      } else {
        if (actual.isEmpty) return pass(null);
        if (context.updateExpectations) {
          return updateExpectationFile(expectedFile.uri, actual);
        }
        return new Result<Null>(
            null,
            context.expectationFileMissing,
            """
  Please create file ${expectedFile.path} with this content:
  $actual""",
            null);
      }
    }
  
    Future<Result<Null>> updateExpectationFile(Uri uri, String actual) async {
      if (actual.isEmpty) {
        await new File.fromUri(uri).delete();
      } else {
        await openWrite(uri, (IOSink sink) {
          sink.write(actual);
        });
      }
      return pass(null);
    }
  }
  
  main([List<String> arguments = const []]) =>
      runMe(arguments, createContext, "../../testing.json");
  