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

Unified Diff: pkg/analyzer/test/src/task/dart_work_manager_test.dart

Issue 1131673004: Use WorkManager(s) in AnalysisDriver. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Undo sorting or context_test.dart file. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/src/context/context_test.dart ('k') | pkg/analyzer/test/src/task/driver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/task/dart_work_manager_test.dart
diff --git a/pkg/analyzer/test/src/task/dart_work_manager_test.dart b/pkg/analyzer/test/src/task/dart_work_manager_test.dart
index 16cbe4431d1b2253a13336581719208f61e28dd8..072ecb5cdb48b51a541fa1c8b34d8db6b94b047b 100644
--- a/pkg/analyzer/test/src/task/dart_work_manager_test.dart
+++ b/pkg/analyzer/test/src/task/dart_work_manager_test.dart
@@ -11,6 +11,7 @@ import 'package:analyzer/src/generated/java_engine.dart' show CaughtException;
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/task/dart.dart';
import 'package:analyzer/src/task/dart_work_manager.dart';
+import 'package:analyzer/src/task/driver.dart';
import 'package:analyzer/task/dart.dart';
import 'package:typed_mock/typed_mock.dart';
import 'package:unittest/unittest.dart';
@@ -218,6 +219,20 @@ class DartWorkManagerTest {
expect_unknownSourceQueue([source2]);
}
+ void test_getNextResultPriority_hasLibrary() {
+ manager.librarySourceQueue.addAll([source1]);
+ expect(manager.getNextResultPriority(), WorkOrderPriority.NORMAL);
+ }
+
+ void test_getNextResultPriority_hasUnknown() {
+ manager.unknownSourceQueue.addAll([source1]);
+ expect(manager.getNextResultPriority(), WorkOrderPriority.NORMAL);
+ }
+
+ void test_getNextResultPriority_nothingToDo() {
+ expect(manager.getNextResultPriority(), WorkOrderPriority.NONE);
+ }
+
void test_resultsComputed_isLibrary() {
manager.unknownSourceQueue.addAll([source1, source2, source3]);
manager.resultsComputed(source2, {SOURCE_KIND: SourceKind.LIBRARY});
« no previous file with comments | « pkg/analyzer/test/src/context/context_test.dart ('k') | pkg/analyzer/test/src/task/driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698