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

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

Issue 1355503004: Fix for updating HINTS during incremental resolution with TM. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/incremental_resolver_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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.task.driver_test; 5 library test.src.task.driver_test;
6 6
7 import 'package:analyzer/src/context/cache.dart'; 7 import 'package:analyzer/src/context/cache.dart';
8 import 'package:analyzer/src/generated/engine.dart' 8 import 'package:analyzer/src/generated/engine.dart'
9 show 9 show
10 AnalysisContext, 10 AnalysisContext,
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 entry.setValue(result1, 111, TargetedResult.EMPTY_LIST); 731 entry.setValue(result1, 111, TargetedResult.EMPTY_LIST);
732 entry.setValue(result2, 222, [new TargetedResult(target, result1)]); 732 entry.setValue(result2, 222, [new TargetedResult(target, result1)]);
733 entry.setValue(result3, 333, [new TargetedResult(target, result2)]); 733 entry.setValue(result3, 333, [new TargetedResult(target, result2)]);
734 expect(entry.getState(result1), CacheState.VALID); 734 expect(entry.getState(result1), CacheState.VALID);
735 expect(entry.getState(result2), CacheState.VALID); 735 expect(entry.getState(result2), CacheState.VALID);
736 expect(entry.getState(result3), CacheState.VALID); 736 expect(entry.getState(result3), CacheState.VALID);
737 expect(entry.getValue(result1), 111); 737 expect(entry.getValue(result1), 111);
738 expect(entry.getValue(result2), 222); 738 expect(entry.getValue(result2), 222);
739 expect(entry.getValue(result3), 333); 739 expect(entry.getValue(result3), 333);
740 // replace result1, keep "dependedOn", invalidate result3 740 // replace result1, keep "dependedOn", invalidate result3
741 entry.setValueIncremental(result2, 2222); 741 entry.setValueIncremental(result2, 2222, true);
742 expect(entry.getState(result1), CacheState.VALID); 742 expect(entry.getState(result1), CacheState.VALID);
743 expect(entry.getState(result2), CacheState.VALID); 743 expect(entry.getState(result2), CacheState.VALID);
744 expect(entry.getState(result3), CacheState.INVALID); 744 expect(entry.getState(result3), CacheState.INVALID);
745 expect(entry.getValue(result1), 111); 745 expect(entry.getValue(result1), 111);
746 expect(entry.getValue(result2), 2222); 746 expect(entry.getValue(result2), 2222);
747 expect(entry.getValue(result3), -3); 747 expect(entry.getValue(result3), -3);
748 expect(entry.getResultData(result1).dependentResults, 748 expect(entry.getResultData(result1).dependentResults,
749 unorderedEquals([new TargetedResult(target, result2)])); 749 unorderedEquals([new TargetedResult(target, result2)]));
750 expect(entry.getResultData(result2).dependedOnResults, 750 expect(entry.getResultData(result2).dependedOnResults,
751 unorderedEquals([new TargetedResult(target, result1)])); 751 unorderedEquals([new TargetedResult(target, result1)]));
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 return DeltaResult.KEEP_CONTINUE; 1107 return DeltaResult.KEEP_CONTINUE;
1108 } 1108 }
1109 return DeltaResult.INVALIDATE; 1109 return DeltaResult.INVALIDATE;
1110 } 1110 }
1111 } 1111 }
1112 1112
1113 class _TestAnalysisTarget implements AnalysisTarget { 1113 class _TestAnalysisTarget implements AnalysisTarget {
1114 @override 1114 @override
1115 Source get source => null; 1115 Source get source => null;
1116 } 1116 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/incremental_resolver_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698