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

Side by Side Diff: pkg/analyzer/test/file_system/memory_file_system_test.dart

Issue 2298913003: Pull in test_reflective_loader 0.0.4 and switch analyzer to it. (Closed)
Patch Set: Fixes for review comments. Created 4 years, 3 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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.file_system.memory_file_system_test; 5 library analyzer.test.file_system.memory_file_system_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:core' hide Resource; 8 import 'dart:core' hide Resource;
9 9
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:analyzer/src/generated/engine.dart' show TimestampedData; 12 import 'package:analyzer/src/generated/engine.dart' show TimestampedData;
13 import 'package:analyzer/src/generated/source.dart'; 13 import 'package:analyzer/src/generated/source.dart';
14 import 'package:analyzer/src/generated/utilities_dart.dart'; 14 import 'package:analyzer/src/generated/utilities_dart.dart';
15 import 'package:path/path.dart'; 15 import 'package:path/path.dart';
16 import 'package:test_reflective_loader/test_reflective_loader.dart';
16 import 'package:unittest/unittest.dart'; 17 import 'package:unittest/unittest.dart';
17 import 'package:watcher/watcher.dart'; 18 import 'package:watcher/watcher.dart';
18 19
19 import '../reflective_tests.dart';
20 import '../utils.dart'; 20 import '../utils.dart';
21 21
22 main() { 22 main() {
23 initializeTestEnvironment(); 23 initializeTestEnvironment();
24 runReflectiveTests(FileSystemExceptionTest); 24 defineReflectiveTests(FileSystemExceptionTest);
25 runReflectiveTests(FileTest); 25 defineReflectiveTests(FileTest);
26 runReflectiveTests(FolderTest); 26 defineReflectiveTests(FolderTest);
27 runReflectiveTests(MemoryFileSourceExistingTest); 27 defineReflectiveTests(MemoryFileSourceExistingTest);
28 runReflectiveTests(MemoryFileSourceNotExistingTest); 28 defineReflectiveTests(MemoryFileSourceNotExistingTest);
29 runReflectiveTests(MemoryResourceProviderTest); 29 defineReflectiveTests(MemoryResourceProviderTest);
30 } 30 }
31 31
32 var _isFile = new isInstanceOf<File>(); 32 var _isFile = new isInstanceOf<File>();
33 var _isFileSystemException = new isInstanceOf<FileSystemException>(); 33 var _isFileSystemException = new isInstanceOf<FileSystemException>();
34 var _isFolder = new isInstanceOf<Folder>(); 34 var _isFolder = new isInstanceOf<Folder>();
35 35
36 @reflectiveTest 36 @reflectiveTest
37 class FileSystemExceptionTest { 37 class FileSystemExceptionTest {
38 void test_constructor() { 38 void test_constructor() {
39 var exception = new FileSystemException('/my/path', 'my message'); 39 var exception = new FileSystemException('/my/path', 'my message');
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 return new Future.delayed(Duration.ZERO, computation); 731 return new Future.delayed(Duration.ZERO, computation);
732 } 732 }
733 733
734 _watchingFolder(String path, test(List<WatchEvent> changesReceived)) { 734 _watchingFolder(String path, test(List<WatchEvent> changesReceived)) {
735 Folder folder = provider.getResource(path); 735 Folder folder = provider.getResource(path);
736 var changesReceived = <WatchEvent>[]; 736 var changesReceived = <WatchEvent>[];
737 folder.changes.listen(changesReceived.add); 737 folder.changes.listen(changesReceived.add);
738 return test(changesReceived); 738 return test(changesReceived);
739 } 739 }
740 } 740 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698