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

Side by Side Diff: packages/analyzer/test/src/task/general_test.dart

Issue 2990843002: Removed fixed dependencies (Closed)
Patch Set: Created 3 years, 4 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
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.general_test; 5 library analyzer.test.src.task.general_test;
6 6
7 import 'package:analyzer/src/generated/engine.dart' 7 import 'package:analyzer/src/generated/engine.dart';
8 hide AnalysisTask, GetContentTask;
9 import 'package:analyzer/src/generated/source.dart'; 8 import 'package:analyzer/src/generated/source.dart';
10 import 'package:analyzer/src/task/general.dart'; 9 import 'package:analyzer/src/task/general.dart';
11 import 'package:analyzer/task/general.dart'; 10 import 'package:analyzer/task/general.dart';
12 import 'package:analyzer/task/model.dart'; 11 import 'package:analyzer/task/model.dart';
12 import 'package:test_reflective_loader/test_reflective_loader.dart';
13 import 'package:typed_mock/typed_mock.dart'; 13 import 'package:typed_mock/typed_mock.dart';
14 import 'package:unittest/unittest.dart'; 14 import 'package:unittest/unittest.dart';
15 15
16 import '../../generated/test_support.dart'; 16 import '../../generated/test_support.dart';
17 import '../../reflective_tests.dart';
18 import '../../utils.dart'; 17 import '../../utils.dart';
19 18
20 main() { 19 main() {
21 initializeTestEnvironment(); 20 initializeTestEnvironment();
22 runReflectiveTests(GetContentTaskTest); 21 defineReflectiveTests(GetContentTaskTest);
23 } 22 }
24 23
25 @reflectiveTest 24 @reflectiveTest
26 class GetContentTaskTest extends EngineTestCase { 25 class GetContentTaskTest extends EngineTestCase {
27 test_buildInputs() { 26 test_buildInputs() {
28 AnalysisTarget target = new TestSource(); 27 AnalysisTarget target = new TestSource();
29 Map<String, TaskInput> inputs = GetContentTask.buildInputs(target); 28 Map<String, TaskInput> inputs = GetContentTask.buildInputs(target);
30 expect(inputs, isEmpty); 29 expect(inputs, isEmpty);
31 } 30 }
32 31
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 GetContentTask task = new GetContentTask(context, target); 73 GetContentTask task = new GetContentTask(context, target);
75 when(context.getContents(target)).thenThrow('My exception!'); 74 when(context.getContents(target)).thenThrow('My exception!');
76 task.perform(); 75 task.perform();
77 expect(task.caughtException, isNull); 76 expect(task.caughtException, isNull);
78 expect(task.outputs, hasLength(2)); 77 expect(task.outputs, hasLength(2));
79 expect(task.outputs[CONTENT], ''); 78 expect(task.outputs[CONTENT], '');
80 expect(task.outputs[MODIFICATION_TIME], -1); 79 expect(task.outputs[MODIFICATION_TIME], -1);
81 } 80 }
82 } 81 }
83 82
84 class _MockContext extends TypedMock implements AnalysisContext { 83 class _MockContext extends TypedMock implements AnalysisContext {}
85 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
86 }
OLDNEW
« no previous file with comments | « packages/analyzer/test/src/task/driver_test.dart ('k') | packages/analyzer/test/src/task/html_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698