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

Unified Diff: packages/analyzer/test/src/task/model_test.dart

Issue 2990843002: Removed fixed dependencies (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: packages/analyzer/test/src/task/model_test.dart
diff --git a/packages/analyzer/test/src/task/model_test.dart b/packages/analyzer/test/src/task/model_test.dart
index 00cdcfa24420877cc67479de735802c3aeb4ea47..edc8f28e26738a78e9aadd0381eb81e683d2a198 100644
--- a/packages/analyzer/test/src/task/model_test.dart
+++ b/packages/analyzer/test/src/task/model_test.dart
@@ -2,25 +2,25 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library test.src.task.model_test;
+library analyzer.test.src.task.model_test;
-import 'package:analyzer/src/generated/engine.dart' hide AnalysisTask;
-import 'package:analyzer/src/generated/java_engine.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/exception/exception.dart';
import 'package:analyzer/src/task/model.dart';
import 'package:analyzer/task/model.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
import 'package:unittest/unittest.dart';
import '../../generated/test_support.dart';
-import '../../reflective_tests.dart';
import '../../utils.dart';
import 'test_support.dart';
main() {
initializeTestEnvironment();
- runReflectiveTests(AnalysisTaskTest);
- runReflectiveTests(ResultDescriptorImplTest);
- runReflectiveTests(SimpleResultCachingPolicyTest);
- runReflectiveTests(TaskDescriptorImplTest);
+ defineReflectiveTests(AnalysisTaskTest);
+ defineReflectiveTests(ResultDescriptorImplTest);
+ defineReflectiveTests(SimpleResultCachingPolicyTest);
+ defineReflectiveTests(TaskDescriptorImplTest);
}
@reflectiveTest
@@ -103,7 +103,7 @@ class SimpleResultCachingPolicyTest extends EngineTestCase {
@reflectiveTest
class TaskDescriptorImplTest extends EngineTestCase {
- test_create() {
+ test_create_noOptionalArgs() {
String name = 'name';
BuildTask buildTask = (context, target) {};
CreateTaskInputs createTaskInputs = (target) {};
@@ -114,12 +114,30 @@ class TaskDescriptorImplTest extends EngineTestCase {
expect(descriptor.name, name);
expect(descriptor.buildTask, equals(buildTask));
expect(descriptor.createTaskInputs, equals(createTaskInputs));
+ expect(descriptor.suitabilityFor(null), TaskSuitability.LOWEST);
+ expect(descriptor.results, results);
+ }
+
+ test_create_withIsAppropriateFor() {
+ String name = 'name';
+ BuildTask buildTask = (context, target) {};
+ CreateTaskInputs createTaskInputs = (target) {};
+ List<ResultDescriptor> results = <ResultDescriptor>[];
+ SuitabilityFor suitabilityFor = (target) => TaskSuitability.NONE;
+ TaskDescriptorImpl descriptor = new TaskDescriptorImpl(
+ name, buildTask, createTaskInputs, results,
+ suitabilityFor: suitabilityFor);
+ expect(descriptor, isNotNull);
+ expect(descriptor.name, name);
+ expect(descriptor.buildTask, equals(buildTask));
+ expect(descriptor.createTaskInputs, equals(createTaskInputs));
+ expect(descriptor.suitabilityFor(null), TaskSuitability.NONE);
expect(descriptor.results, results);
}
test_createTask() {
- BuildTask buildTask = (context, target) =>
- new TestAnalysisTask(context, target);
+ BuildTask buildTask =
+ (context, target) => new TestAnalysisTask(context, target);
CreateTaskInputs createTaskInputs = (target) {};
List<ResultDescriptor> results = <ResultDescriptor>[];
TaskDescriptorImpl descriptor =
« no previous file with comments | « packages/analyzer/test/src/task/manager_test.dart ('k') | packages/analyzer/test/src/task/options_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698