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

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

Issue 2391423003: Switch 'analyzer' to 'package:test' and test_reflective_loader ^0.1.0. (Closed)
Patch Set: Created 4 years, 2 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 analyzer.test.src.task.manager_test; 5 library analyzer.test.src.task.manager_test;
6 6
7 import 'package:analyzer/exception/exception.dart'; 7 import 'package:analyzer/exception/exception.dart';
8 import 'package:analyzer/src/task/manager.dart'; 8 import 'package:analyzer/src/task/manager.dart';
9 import 'package:analyzer/task/model.dart'; 9 import 'package:analyzer/task/model.dart';
10 import 'package:test/test.dart';
10 import 'package:test_reflective_loader/test_reflective_loader.dart'; 11 import 'package:test_reflective_loader/test_reflective_loader.dart';
11 import 'package:unittest/unittest.dart';
12 12
13 import '../../generated/test_support.dart'; 13 import '../../generated/test_support.dart';
14 import '../../utils.dart'; 14 import '../../utils.dart';
15 15
16 main() { 16 main() {
17 initializeTestEnvironment(); 17 initializeTestEnvironment();
18 defineReflectiveTests(TaskManagerTest); 18 defineReflectiveSuite(() {
19 defineReflectiveTests(TaskManagerTest);
20 });
19 } 21 }
20 22
21 @reflectiveTest 23 @reflectiveTest
22 class TaskManagerTest extends EngineTestCase { 24 class TaskManagerTest extends EngineTestCase {
23 static final ResultDescriptor result1 = new ResultDescriptor('result1', null); 25 static final ResultDescriptor result1 = new ResultDescriptor('result1', null);
24 static final ResultDescriptor result2 = new ResultDescriptor('result2', null); 26 static final ResultDescriptor result2 = new ResultDescriptor('result2', null);
25 27
26 test_addGeneralResult() { 28 test_addGeneralResult() {
27 TaskManager manager = new TaskManager(); 29 TaskManager manager = new TaskManager();
28 manager.addGeneralResult(result1); 30 manager.addGeneralResult(result1);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 test_removePriorityResult_present() { 125 test_removePriorityResult_present() {
124 TaskManager manager = new TaskManager(); 126 TaskManager manager = new TaskManager();
125 manager.addPriorityResult(result1); 127 manager.addPriorityResult(result1);
126 manager.addPriorityResult(result2); 128 manager.addPriorityResult(result2);
127 Set<ResultDescriptor> results = manager.priorityResults; 129 Set<ResultDescriptor> results = manager.priorityResults;
128 expect(results, unorderedEquals([result1, result2])); 130 expect(results, unorderedEquals([result1, result2]));
129 manager.removePriorityResult(result1); 131 manager.removePriorityResult(result1);
130 expect(results, unorderedEquals([result2])); 132 expect(results, unorderedEquals([result2]));
131 } 133 }
132 } 134 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698