OLD | NEW |
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 analyzer.test.src.task.model_test; | 5 library analyzer.test.src.task.model_test; |
6 | 6 |
7 import 'package:analyzer/exception/exception.dart'; | 7 import 'package:analyzer/exception/exception.dart'; |
8 import 'package:analyzer/src/generated/engine.dart'; | 8 import 'package:analyzer/src/generated/engine.dart'; |
9 import 'package:analyzer/src/task/model.dart'; | 9 import 'package:analyzer/src/task/model.dart'; |
10 import 'package:analyzer/task/model.dart'; | 10 import 'package:analyzer/task/model.dart'; |
11 import 'package:test/test.dart'; | 11 import 'package:test/test.dart'; |
12 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 12 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
13 | 13 |
14 import '../../generated/test_support.dart'; | 14 import '../../generated/test_support.dart'; |
15 import '../../utils.dart'; | |
16 import 'test_support.dart'; | 15 import 'test_support.dart'; |
17 | 16 |
18 main() { | 17 main() { |
19 initializeTestEnvironment(); | |
20 defineReflectiveSuite(() { | 18 defineReflectiveSuite(() { |
21 defineReflectiveTests(AnalysisTaskTest); | 19 defineReflectiveTests(AnalysisTaskTest); |
22 defineReflectiveTests(ResultDescriptorImplTest); | 20 defineReflectiveTests(ResultDescriptorImplTest); |
23 defineReflectiveTests(SimpleResultCachingPolicyTest); | 21 defineReflectiveTests(SimpleResultCachingPolicyTest); |
24 defineReflectiveTests(TaskDescriptorImplTest); | 22 defineReflectiveTests(TaskDescriptorImplTest); |
25 }); | 23 }); |
26 } | 24 } |
27 | 25 |
28 @reflectiveTest | 26 @reflectiveTest |
29 class AnalysisTaskTest extends EngineTestCase { | 27 class AnalysisTaskTest extends EngineTestCase { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 AnalysisContext context = null; | 145 AnalysisContext context = null; |
148 AnalysisTarget target = new TestSource(); | 146 AnalysisTarget target = new TestSource(); |
149 Map<String, dynamic> inputs = {}; | 147 Map<String, dynamic> inputs = {}; |
150 AnalysisTask createTask = descriptor.createTask(context, target, inputs); | 148 AnalysisTask createTask = descriptor.createTask(context, target, inputs); |
151 expect(createTask, isNotNull); | 149 expect(createTask, isNotNull); |
152 expect(createTask.context, context); | 150 expect(createTask.context, context); |
153 expect(createTask.inputs, inputs); | 151 expect(createTask.inputs, inputs); |
154 expect(createTask.target, target); | 152 expect(createTask.target, target); |
155 } | 153 } |
156 } | 154 } |
OLD | NEW |