anchor.diff:      ]);
     }
   
  -  void _assertComputedImportedLibraries(List<String> expected) {
  +  void _assertComputedImportedLibraries(
  +    List<String> expected, {
  +    bool hasCore = false,
  +  }) {
       expected = expected.map(convertPath).toList();
  +
  +    if (hasCore) {
  +      var corePath = convertPath('/sdk/lib/core/core.dart');
  +      expected.add(corePath);
  +    }
  +
       expect(
         _computer.computedImportedLibraries,
         unorderedEquals(expected),
  
positive.code:   }
  
    Future<void> test_compute_updateImports() async {
      var corePath = convertPath('/sdk/lib/core/core.dart');
  
      var aPath = convertPath('/workspace/dart/test/lib/a.dart');
      newFile(aPath, content: r'''
  class A {}
  ''');
  
      _createFileResolver();
      await _compute(r'''
  var a = ^;
  ''');
      _assertComputedImportedLibraries([corePath]);
      _assertHasClass(text: 'String');
  
      // Repeat the query, still has 'A'.
  
negative.code: ^
  ''';
  
      await _compute(content);
      _assertComputedImportedLibraries([aPath], hasCore: true);
      _assertHasClass(text: 'A');
  
      // Repeat the query, still has 'A'.
  