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

Side by Side Diff: pkg/analysis_server/test/src/watch_manager_test.dart

Issue 2394683006: Switch analysis_server to use 'package:test'. (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 test.src.watch_manager_test; 5 library test.src.watch_manager_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/watch_manager.dart'; 9 import 'package:analysis_server/src/watch_manager.dart';
10 import 'package:analyzer/file_system/file_system.dart'; 10 import 'package:analyzer/file_system/file_system.dart';
11 import 'package:analyzer/file_system/memory_file_system.dart'; 11 import 'package:analyzer/file_system/memory_file_system.dart';
12 import 'package:test/test.dart';
12 import 'package:test_reflective_loader/test_reflective_loader.dart'; 13 import 'package:test_reflective_loader/test_reflective_loader.dart';
13 import 'package:unittest/unittest.dart';
14 import 'package:watcher/watcher.dart'; 14 import 'package:watcher/watcher.dart';
15 15
16 import '../mocks.dart'; 16 import '../mocks.dart';
17 import '../utils.dart'; 17 import '../utils.dart';
18 18
19 main() { 19 main() {
20 initializeTestEnvironment(); 20 initializeTestEnvironment();
21 defineReflectiveTests(WatchManagerTest); 21 defineReflectiveSuite(() {
22 defineReflectiveTests(WatchNodeTest); 22 defineReflectiveTests(WatchManagerTest);
23 defineReflectiveTests(WatchNodeTest);
24 });
23 } 25 }
24 26
25 /** 27 /**
26 * Tokens that can be used for testing purposes. 28 * Tokens that can be used for testing purposes.
27 */ 29 */
28 class Token { 30 class Token {
29 /** 31 /**
30 * A name used for debugging. 32 * A name used for debugging.
31 */ 33 */
32 final String name; 34 final String name;
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 void test_insert_top() { 345 void test_insert_top() {
344 WatchNode rootNode = new WatchNode(null); 346 WatchNode rootNode = new WatchNode(null);
345 WatchNode topNode = new WatchNode(provider.getFolder('/a/b')); 347 WatchNode topNode = new WatchNode(provider.getFolder('/a/b'));
346 348
347 rootNode.insert(topNode); 349 rootNode.insert(topNode);
348 expect(rootNode.children, equals([topNode])); 350 expect(rootNode.children, equals([topNode]));
349 expect(topNode.parent, rootNode); 351 expect(topNode.parent, rootNode);
350 expect(topNode.children, isEmpty); 352 expect(topNode.children, isEmpty);
351 } 353 }
352 } 354 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698