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

Unified Diff: pkg/analyzer/test/file_system/memory_file_system_test.dart

Issue 372763003: Move file_system libraries into 'analyzer'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/pubspec.yaml ('k') | pkg/analyzer/test/file_system/physical_resource_provider_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/file_system/memory_file_system_test.dart
diff --git a/pkg/analysis_server/test/resource_test.dart b/pkg/analyzer/test/file_system/memory_file_system_test.dart
similarity index 90%
rename from pkg/analysis_server/test/resource_test.dart
rename to pkg/analyzer/test/file_system/memory_file_system_test.dart
index a290b39b5c4585370302f8b3395cfec14322a1fa..8956b418f8a02c8aaa9ddc3d5ac96829562bed9b 100644
--- a/pkg/analysis_server/test/resource_test.dart
+++ b/pkg/analyzer/test/file_system/memory_file_system_test.dart
@@ -2,18 +2,17 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library test.resource;
+library test.memory_file_system;
import 'dart:async';
-import 'package:analysis_server/src/resource.dart';
import 'package:analyzer/src/generated/engine.dart' show TimestampedData;
import 'package:analyzer/src/generated/source.dart';
import 'package:path/path.dart';
import 'package:unittest/unittest.dart';
import 'package:watcher/watcher.dart';
-
-import 'mocks.dart';
+import 'package:analyzer/file_system/memory_file_system.dart';
+import 'package:analyzer/file_system/file_system.dart';
var _isFile = new isInstanceOf<File>();
@@ -42,7 +41,7 @@ main() {
group('Watch', () {
Future delayed(computation()) {
- return pumpEventQueue().then((_) => computation());
+ return new Future.delayed(Duration.ZERO, computation);
}
watchingFolder(String path, test(List<WatchEvent> changesReceived)) {
@@ -476,57 +475,4 @@ main() {
});
});
});
-
- group('ResourceUriResolver', testResourceResourceUriResolver);
-}
-
-
-void testResourceResourceUriResolver() {
- MemoryResourceProvider provider;
- ResourceUriResolver resolver;
-
- setUp(() {
- provider = new MemoryResourceProvider();
- resolver = new ResourceUriResolver(provider);
- provider.newFile('/test.dart', '');
- provider.newFolder('/folder');
- });
-
- group('fromEncoding', () {
- test('file', () {
- var uri = new Uri(path: '/test.dart');
- Source source = resolver.fromEncoding(UriKind.FILE_URI, uri);
- expect(source, isNotNull);
- expect(source.exists(), isTrue);
- expect(source.fullName, '/test.dart');
- });
-
- test('not a UriKind.FILE_URI', () {
- var uri = new Uri(path: '/test.dart');
- Source source = resolver.fromEncoding(UriKind.DART_URI, uri);
- expect(source, isNull);
- });
- });
-
- group('resolveAbsolute', () {
- test('file', () {
- var uri = new Uri(scheme: 'file', path: '/test.dart');
- Source source = resolver.resolveAbsolute(uri);
- expect(source, isNotNull);
- expect(source.exists(), isTrue);
- expect(source.fullName, '/test.dart');
- });
-
- test('folder', () {
- var uri = new Uri(scheme: 'file', path: '/folder');
- Source source = resolver.resolveAbsolute(uri);
- expect(source, isNull);
- });
-
- test('not a file URI', () {
- var uri = new Uri(scheme: 'https', path: '127.0.0.1/test.dart');
- Source source = resolver.resolveAbsolute(uri);
- expect(source, isNull);
- });
- });
}
« no previous file with comments | « pkg/analyzer/pubspec.yaml ('k') | pkg/analyzer/test/file_system/physical_resource_provider_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698