Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: pkg/analyzer/test/src/context/context_test.dart

Issue 1214853028: One more fix for making removing overlays incremental changes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/analyzer/test/generated/engine_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.src.context.context_test; 5 library test.src.context.context_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analyzer/file_system/memory_file_system.dart'; 9 import 'package:analyzer/file_system/memory_file_system.dart';
10 import 'package:analyzer/src/cancelable_future.dart'; 10 import 'package:analyzer/src/cancelable_future.dart';
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 // add overlay 301 // add overlay
302 context.setContents(source, r''' 302 context.setContents(source, r'''
303 main() { 303 main() {
304 print(12); 304 print(12);
305 } 305 }
306 '''); 306 ''');
307 _analyzeAll_assertFinished(); 307 _analyzeAll_assertFinished();
308 expect(context.getResolvedCompilationUnit2(source, source), unit); 308 expect(context.getResolvedCompilationUnit2(source, source), unit);
309 // remove overlay 309 // remove overlay
310 context.setContents(source, null); 310 context.setContents(source, null);
311 context.validateCacheConsistency();
311 _analyzeAll_assertFinished(); 312 _analyzeAll_assertFinished();
312 expect(context.getResolvedCompilationUnit2(source, source), unit); 313 expect(context.getResolvedCompilationUnit2(source, source), unit);
313 } 314 }
314 315
315 Future test_applyChanges_removeContainer() { 316 Future test_applyChanges_removeContainer() {
316 SourcesChangedListener listener = new SourcesChangedListener(); 317 SourcesChangedListener listener = new SourcesChangedListener();
317 context.onSourcesChanged.listen(listener.onData); 318 context.onSourcesChanged.listen(listener.onData);
318 String libAContents = r''' 319 String libAContents = r'''
319 library libA; 320 library libA;
320 import 'libB.dart';'''; 321 import 'libB.dart';''';
(...skipping 1984 matching lines...) Expand 10 before | Expand all | Expand 10 after
2305 } 2306 }
2306 } 2307 }
2307 2308
2308 class _AnalysisContextImplTest_test_applyChanges_removeContainer 2309 class _AnalysisContextImplTest_test_applyChanges_removeContainer
2309 implements SourceContainer { 2310 implements SourceContainer {
2310 Source libB; 2311 Source libB;
2311 _AnalysisContextImplTest_test_applyChanges_removeContainer(this.libB); 2312 _AnalysisContextImplTest_test_applyChanges_removeContainer(this.libB);
2312 @override 2313 @override
2313 bool contains(Source source) => source == libB; 2314 bool contains(Source source) => source == libB;
2314 } 2315 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/engine_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698