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

Side by Side Diff: pkg/analyzer/lib/file_system/memory_file_system.dart

Issue 2402883002: More test clean-up (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
« no previous file with comments | « no previous file | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.file_system.memory_file_system; 5 library analyzer.file_system.memory_file_system;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:convert'; 9 import 'dart:convert';
10 import 'dart:core'; 10 import 'dart:core';
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 */ 229 */
230 void writeOn(StringSink sink) { 230 void writeOn(StringSink sink) {
231 List<String> paths = _pathToResource.keys.toList(); 231 List<String> paths = _pathToResource.keys.toList();
232 paths.sort(); 232 paths.sort();
233 paths.forEach(sink.writeln); 233 paths.forEach(sink.writeln);
234 } 234 }
235 235
236 void _checkFileAtPath(String path) { 236 void _checkFileAtPath(String path) {
237 _MemoryResource resource = _pathToResource[path]; 237 _MemoryResource resource = _pathToResource[path];
238 if (resource is! _MemoryFile) { 238 if (resource is! _MemoryFile) {
239 if (resource == null) {
240 throw new ArgumentError('File expected at "$path" but does not exist');
241 }
239 throw new ArgumentError( 242 throw new ArgumentError(
240 'File expected at "$path" but ${resource.runtimeType} found'); 243 'File expected at "$path" but ${resource.runtimeType} found');
241 } 244 }
242 } 245 }
243 246
244 void _checkFolderAtPath(String path) { 247 void _checkFolderAtPath(String path) {
245 _MemoryResource resource = _pathToResource[path]; 248 _MemoryResource resource = _pathToResource[path];
246 if (resource is! _MemoryFolder) { 249 if (resource is! _MemoryFolder) {
247 throw new ArgumentError( 250 throw new ArgumentError(
248 'Folder expected at "$path" but ${resource.runtimeType} found'); 251 'Folder expected at "$path" but ${resource.runtimeType} found');
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 } 564 }
562 return path == other.path; 565 return path == other.path;
563 } 566 }
564 567
565 @override 568 @override
566 String toString() => path; 569 String toString() => path;
567 570
568 @override 571 @override
569 Uri toUri() => _provider.pathContext.toUri(path); 572 Uri toUri() => _provider.pathContext.toUri(path);
570 } 573 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698