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

Side by Side Diff: pkg/analyzer/test/src/task/options_work_manager_test.dart

Issue 1490233007: Remove the old task model (Closed) Base URL: https://github.com/dart-lang/sdk.git@analyzer-breaking-0.27
Patch Set: Created 5 years 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
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.options_work_manager_test; 5 library test.src.task.options_work_manager_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 AnalysisEngine, 10 AnalysisEngine,
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 expect_sourceQueue([source2]); 104 expect_sourceQueue([source2]);
105 // remove source2 105 // remove source2
106 manager.applyChange([], [], [source2]); 106 manager.applyChange([], [], [source2]);
107 expect_sourceQueue([]); 107 expect_sourceQueue([]);
108 // remove source3 108 // remove source3
109 manager.applyChange([], [], [source3]); 109 manager.applyChange([], [], [source3]);
110 expect_sourceQueue([]); 110 expect_sourceQueue([]);
111 } 111 }
112 112
113 void test_applyPriorityTargets() { 113 void test_applyPriorityTargets() {
114 when(context.shouldErrorsBeAnalyzed(source2, null)).thenReturn(true); 114 when(context.shouldErrorsBeAnalyzed(source2)).thenReturn(true);
115 when(context.shouldErrorsBeAnalyzed(source3, null)).thenReturn(true); 115 when(context.shouldErrorsBeAnalyzed(source3)).thenReturn(true);
116 manager.priorityResultQueue 116 manager.priorityResultQueue
117 .add(new TargetedResult(source1, ANALYSIS_OPTIONS_ERRORS)); 117 .add(new TargetedResult(source1, ANALYSIS_OPTIONS_ERRORS));
118 manager.priorityResultQueue 118 manager.priorityResultQueue
119 .add(new TargetedResult(source2, ANALYSIS_OPTIONS_ERRORS)); 119 .add(new TargetedResult(source2, ANALYSIS_OPTIONS_ERRORS));
120 // -source1 +source3 120 // -source1 +source3
121 manager.applyPriorityTargets([source2, source3]); 121 manager.applyPriorityTargets([source2, source3]);
122 expect( 122 expect(
123 manager.priorityResultQueue, 123 manager.priorityResultQueue,
124 unorderedEquals([ 124 unorderedEquals([
125 new TargetedResult(source2, ANALYSIS_OPTIONS_ERRORS), 125 new TargetedResult(source2, ANALYSIS_OPTIONS_ERRORS),
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 return new AnalysisErrorInfoImpl( 278 return new AnalysisErrorInfoImpl(
279 errors, getCacheEntry(source).getValue(LINE_INFO)); 279 errors, getCacheEntry(source).getValue(LINE_INFO));
280 } 280 }
281 281
282 @override 282 @override
283 ChangeNoticeImpl getNotice(Source source) => 283 ChangeNoticeImpl getNotice(Source source) =>
284 _pendingNotices.putIfAbsent(source, () => new ChangeNoticeImpl(source)); 284 _pendingNotices.putIfAbsent(source, () => new ChangeNoticeImpl(source));
285 285
286 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 286 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
287 } 287 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/task/options_test.dart ('k') | pkg/analyzer/test/src/task/strong/strong_test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698