anchor.diff:  
   resolverTests(Resolvers resolvers) {
     var entryPoint = new AssetId('a', 'web/main.dart');
  -  Future validateResolver({Map<String, String> inputs, validator(Resolver),
  -      List<String> messages: const [], bool resolveAllLibraries: true}) {
  -    return applyTransformers(
  -        [[new TestTransformer(resolvers, entryPoint, validator, resolveAllLibraries)]],
  -        inputs: inputs, messages: messages);
  +  Future validateResolver(
  +      {Map<String, String> inputs,
  +      validator(Resolver),
  +      List<String> messages: const [],
  +      bool resolveAllLibraries: true}) {
  +    return applyTransformers([
  +      [
  +        new TestTransformer(
  +            resolvers, entryPoint, validator, resolveAllLibraries)
  +      ]
  +    ], inputs: inputs, messages: messages);
     }
   
     group('Resolver', () {
       test('should handle initial files', () {
         return validateResolver(
  -          inputs: {'a|web/main.dart': ' main() {}',}, validator: (resolver) {
  -        var source = resolver.sources[entryPoint];
  -        expect(source.modificationStamp, 1);
  -
  -        var lib = resolver.getLibrary(entryPoint);
  -        expect(lib, isNotNull);
  -      });
  +          inputs: {'a|web/main.dart': ' main() {}',},
  +          validator: (resolver) {
  +            var source = resolver.sources[entryPoint];
  +            expect(source.modificationStamp, 1);
  +
  +            var lib = resolver.getLibrary(entryPoint);
  +            expect(lib, isNotNull);
  +          });
       });
   
       test('should update when sources change', () {
  -      return validateResolver(inputs: {
  -        'a|web/main.dart': ''' main() {
  +      return validateResolver(
  +          inputs: {
  +            'a|web/main.dart': ''' main() {
                   } ''',
  -      }, validator: (resolver) {
  -        var source = resolver.sources[entryPoint];
  -        expect(source.modificationStamp, 2);
  -
  -        var lib = resolver.getLibrary(entryPoint);
  -        expect(lib, isNotNull);
  -        expect(lib.entryPoint, isNotNull);
  -      });
  +          },
  +          validator: (resolver) {
  +            var source = resolver.sources[entryPoint];
  +            expect(source.modificationStamp, 2);
  +
  +            var lib = resolver.getLibrary(entryPoint);
  +            expect(lib, isNotNull);
  +            expect(lib.entryPoint, isNotNull);
  +          });
       });
   
       test('should follow imports', () {
  -      return validateResolver(inputs: {
  -        'a|web/main.dart': '''
  +      return validateResolver(
  +          inputs: {
  +            'a|web/main.dart': '''
                 import 'a.dart';
   
                 main() {
                 } ''',
  -        'a|web/a.dart': '''
  +            'a|web/a.dart': '''
                 library a;
                 ''',
  -      }, validator: (resolver) {
  -        var lib = resolver.getLibrary(entryPoint);
  -        expect(lib.importedLibraries.length, 2);
  -        var libA = lib.importedLibraries.where((l) => l.name == 'a').single;
  -        expect(libA.getType('Foo'), isNull);
  -      });
  +          },
  +          validator: (resolver) {
  +            var lib = resolver.getLibrary(entryPoint);
  +            expect(lib.importedLibraries.length, 2);
  +            var libA = lib.importedLibraries.where((l) => l.name == 'a').single;
  +            expect(libA.getType('Foo'), isNull);
  +          });
       });
   
       test('should update changed imports', () {
  -      return validateResolver(inputs: {
  -        'a|web/main.dart': '''
  +      return validateResolver(
  +          inputs: {
  +            'a|web/main.dart': '''
                 import 'a.dart';
   
                 main() {
                 } ''',
  -        'a|web/a.dart': '''
  +            'a|web/a.dart': '''
                 library a;
                 class Foo {}
                 ''',
  -      }, validator: (resolver) {
  -        var lib = resolver.getLibrary(entryPoint);
  -        expect(lib.importedLibraries.length, 2);
  -        var libA = lib.importedLibraries.where((l) => l.name == 'a').single;
  -        expect(libA.getType('Foo'), isNotNull);
  -      });
  +          },
  +          validator: (resolver) {
  +            var lib = resolver.getLibrary(entryPoint);
  +            expect(lib.importedLibraries.length, 2);
  +            var libA = lib.importedLibraries.where((l) => l.name == 'a').single;
  +            expect(libA.getType('Foo'), isNotNull);
  +          });
       });
   
       test('should follow package imports', () {
  -      return validateResolver(inputs: {
  -        'a|web/main.dart': '''
  +      return validateResolver(
  +          inputs: {
  +            'a|web/main.dart': '''
                 import 'package:b/b.dart';
   
                 main() {
                 } ''',
  -        'b|lib/b.dart': '''
  +            'b|lib/b.dart': '''
                 library b;
                 ''',
  -      }, validator: (resolver) {
  -        var lib = resolver.getLibrary(entryPoint);
  -        expect(lib.importedLibraries.length, 2);
  -        var libB = lib.importedLibraries.where((l) => l.name == 'b').single;
  -        expect(libB.getType('Foo'), isNull);
  -      });
  +          },
  +          validator: (resolver) {
  +            var lib = resolver.getLibrary(entryPoint);
  +            expect(lib.importedLibraries.length, 2);
  +            var libB = lib.importedLibraries.where((l) => l.name == 'b').single;
  +            expect(libB.getType('Foo'), isNull);
  +          });
       });
   
       test('handles missing files', () {
  -      return validateResolver(inputs: {
  -        'a|web/main.dart': '''
  +      return validateResolver(
  +          inputs: {
  +            'a|web/main.dart': '''
                 import 'package:b/missing.dart';
   
                 main() {
                 } ''',
  -      }, validator: (resolver) {
  -        var lib = resolver.getLibrary(entryPoint);
  -        expect(lib.importedLibraries.length, 1);
  -      });
  +          },
  +          validator: (resolver) {
  +            var lib = resolver.getLibrary(entryPoint);
  +            expect(lib.importedLibraries.length, 1);
  +          });
       });
   
       test('should update on changed package imports', () {
         // TODO(sigmund): remove modification below, see dartbug.com/22638
  -      return validateResolver(inputs: {
  -        'a|web/main.dart': '''
  +      return validateResolver(
  +          inputs: {
  +            'a|web/main.dart': '''
                 import 'package:b/missing.dart';
   
                 main() {
                 } // modified, but we shouldn't need to! ''',
  -        'b|lib/missing.dart': '''
  +            'b|lib/missing.dart': '''
                 library b;
                 class Bar {}
                 ''',
  -      }, validator: (resolver) {
  -        var lib = resolver.getLibrary(entryPoint);
  -        expect(lib.importedLibraries.length, 2);
  -        var libB = lib.importedLibraries.where((l) => l.name == 'b').single;
  -        expect(libB.getType('Bar'), isNotNull);
  -      });
  +          },
  +          validator: (resolver) {
  +            var lib = resolver.getLibrary(entryPoint);
  +            expect(lib.importedLibraries.length, 2);
  +            var libB = lib.importedLibraries.where((l) => l.name == 'b').single;
  +            expect(libB.getType('Bar'), isNotNull);
  +          });
       });
   
       test('should handle deleted files', () {
  -      return validateResolver(inputs: {
  -        'a|web/main.dart': '''
  +      return validateResolver(
  +          inputs: {
  +            'a|web/main.dart': '''
                 import 'package:b/missing.dart';
   
                 main() {
                 } ''',
  -      }, validator: (resolver) {
  -        var lib = resolver.getLibrary(entryPoint);
  -        expect(lib.importedLibraries.length, 1);
  -      });
  +          },
  +          validator: (resolver) {
  +            var lib = resolver.getLibrary(entryPoint);
  +            expect(lib.importedLibraries.length, 1);
  +          });
       });
   
       test('should fail on absolute URIs', () {
         var warningPrefix = 'warning: absolute paths not allowed';
  -      return validateResolver(inputs: {
  -        'a|web/main.dart': '''
  +      return validateResolver(
  +          inputs: {
  +            'a|web/main.dart': '''
                 import '/b.dart';
   
                 main() {
                 } ''',
  -      }, messages: [
  -        // First from the AST walker
  -        '$warningPrefix: "/b.dart" (web/main.dart 0 14)',
  -        '$warningPrefix: "/b.dart"',
  -      ], validator: (resolver) {
  -        var lib = resolver.getLibrary(entryPoint);
  -        expect(lib.importedLibraries.length, 1);
  -      });
  +          },
  +          messages: [
  +            // First from the AST walker
  +            '$warningPrefix: "/b.dart" (web/main.dart 0 14)',
  +            '$warningPrefix: "/b.dart"',
  +          ],
  +          validator: (resolver) {
  +            var lib = resolver.getLibrary(entryPoint);
  +            expect(lib.importedLibraries.length, 1);
  +          });
       });
   
       test('should list all libraries', () {
  -      return validateResolver(inputs: {
  -        'a|web/main.dart': '''
  +      return validateResolver(
  +          inputs: {
  +            'a|web/main.dart': '''
                 library a.main;
                 import 'package:a/a.dart';
                 import 'package:a/b.dart';
                 export 'package:a/d.dart';
                 ''',
  -        'a|lib/a.dart': 'library a.a;\n import "package:a/c.dart";',
  -        'a|lib/b.dart': 'library a.b;\n import "c.dart";',
  -        'a|lib/c.dart': 'library a.c;',
  -        'a|lib/d.dart': 'library a.d;'
  -      }, validator: (resolver) {
  -        var libs = resolver.libraries.where((l) => !l.isInSdk);
  -        expect(libs.map((l) => l.name),
  -            unorderedEquals(['a.main', 'a.a', 'a.b', 'a.c', 'a.d',]));
  -      });
  +            'a|lib/a.dart': 'library a.a;\n import "package:a/c.dart";',
  +            'a|lib/b.dart': 'library a.b;\n import "c.dart";',
  +            'a|lib/c.dart': 'library a.c;',
  +            'a|lib/d.dart': 'library a.d;'
  +          },
  +          validator: (resolver) {
  +            var libs = resolver.libraries.where((l) => !l.isInSdk);
  +            expect(libs.map((l) => l.name),
  +                unorderedEquals(['a.main', 'a.a', 'a.b', 'a.c', 'a.d',]));
  +          });
       });
   
       test('should resolve types and library uris', () {
  -      return validateResolver(inputs: {
  -        'a|web/main.dart': '''
  +      return validateResolver(
  +          inputs: {
  +            'a|web/main.dart': '''
                 import 'dart:core';
                 import 'package:a/a.dart';
                 import 'package:a/b.dart';
                 import 'sub_dir/d.dart';
                 class Foo {}
                 ''',
  -        'a|lib/a.dart': 'library a.a;\n import "package:a/c.dart";',
  -        'a|lib/b.dart': 'library a.b;\n import "c.dart";',
  -        'a|lib/c.dart': '''
  +            'a|lib/a.dart': 'library a.a;\n import "package:a/c.dart";',
  +            'a|lib/b.dart': 'library a.b;\n import "c.dart";',
  +            'a|lib/c.dart': '''
                   library a.c;
                   class Bar {}
                   ''',
  -        'a|web/sub_dir/d.dart': '''
  +            'a|web/sub_dir/d.dart': '''
                   library a.web.sub_dir.d;
                   class Baz{}
                   ''',
  -      }, validator: (resolver) {
  -        var a = resolver.getLibraryByName('a.a');
  -        expect(a, isNotNull);
  -        expect(resolver.getImportUri(a).toString(), 'package:a/a.dart');
  -        expect(resolver.getLibraryByUri(Uri.parse('package:a/a.dart')), a);
  -
  -        var main = resolver.getLibraryByName('');
  -        expect(main, isNotNull);
  -        expect(resolver.getImportUri(main), isNull);
  -
  -        var fooType = resolver.getType('Foo');
  -        expect(fooType, isNotNull);
  -        expect(fooType.library, main);
  -
  -        var barType = resolver.getType('a.c.Bar');
  -        expect(barType, isNotNull);
  -        expect(resolver.getImportUri(barType.library).toString(),
  -            'package:a/c.dart');
  -        expect(
  -            resolver.getSourceAssetId(barType), new AssetId('a', 'lib/c.dart'));
  -
  -        var bazType = resolver.getType('a.web.sub_dir.d.Baz');
  -        expect(bazType, isNotNull);
  -        expect(resolver.getImportUri(bazType.library), isNull);
  -        expect(
  -            resolver.getImportUri(bazType.library, from: entryPoint).toString(),
  -            'sub_dir/d.dart');
  -
  -        var hashMap = resolver.getType('dart.collection.HashMap');
  -        expect(resolver.getImportUri(hashMap.library).toString(),
  -            'dart:collection');
  -        expect(resolver.getLibraryByUri(Uri.parse('dart:collection')),
  -            hashMap.library);
  -      });
  +          },
  +          validator: (resolver) {
  +            var a = resolver.getLibraryByName('a.a');
  +            expect(a, isNotNull);
  +            expect(resolver.getImportUri(a).toString(), 'package:a/a.dart');
  +            expect(resolver.getLibraryByUri(Uri.parse('package:a/a.dart')), a);
  +
  +            var main = resolver.getLibraryByName('');
  +            expect(main, isNotNull);
  +            expect(resolver.getImportUri(main), isNull);
  +
  +            var fooType = resolver.getType('Foo');
  +            expect(fooType, isNotNull);
  +            expect(fooType.library, main);
  +
  +            var barType = resolver.getType('a.c.Bar');
  +            expect(barType, isNotNull);
  +            expect(resolver.getImportUri(barType.library).toString(),
  +                'package:a/c.dart');
  +            expect(resolver.getSourceAssetId(barType),
  +                new AssetId('a', 'lib/c.dart'));
  +
  +            var bazType = resolver.getType('a.web.sub_dir.d.Baz');
  +            expect(bazType, isNotNull);
  +            expect(resolver.getImportUri(bazType.library), isNull);
  +            expect(
  +                resolver
  +                    .getImportUri(bazType.library, from: entryPoint)
  +                    .toString(),
  +                'sub_dir/d.dart');
  +
  +            var hashMap = resolver.getType('dart.collection.HashMap');
  +            expect(resolver.getImportUri(hashMap.library).toString(),
  +                'dart:collection');
  +            expect(resolver.getLibraryByUri(Uri.parse('dart:collection')),
  +                hashMap.library);
  +          });
       });
   
       test('should resolve constants in transitive imports by default', () {
  -      return validateResolver(inputs: {
  -        'a|web/main.dart': '''
  +      return validateResolver(
  +          inputs: {
  +            'a|web/main.dart': '''
                 library web.main;
   
                 import 'package:a/do_resolve.dart';
  
positive.code: 
                class Foo extends Bar {}
                ''',
          'a|lib/do_resolve.dart': '''
                const int annotation = 0;
                @annotation
                class Bar {}''',
        }, validator: (resolver) {
          var main = resolver.getLibraryByName('web.main');
          var meta =
              main.unit.declarations[0].element.supertype.element.metadata[0];
          expect(meta, isNotNull);
          expect(meta.constantValue, isNotNull);
        });
      });
  
      test('can disable resolving of constants in transitive imports', () {
        return validateResolver(resolveAllLibraries: false, inputs: {
          'a|web/main.dart': '''
                library web.main;
  
                import 'package:a/dont_resolve.dart';
  
negative.code:   final Function validator;
    final bool resolveAllLibraries;
  
    TestTransformer(Resolvers resolvers, this.primary, this.validator,
        this.resolveAllLibraries) {
      this.resolvers = resolvers;
    }
  
  