OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 // SharedOptions=--supermixin | 4 // SharedOptions=--supermixin |
5 | 5 |
6 library front_end.test.memory_file_system_test; | 6 library front_end.test.memory_file_system_test; |
7 | 7 |
8 import 'dart:convert'; | 8 import 'dart:convert'; |
9 import 'dart:io' as io; | 9 import 'dart:io' as io; |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 file = entityForPath(path); | 37 file = entityForPath(path); |
38 } | 38 } |
39 | 39 |
40 test_createDirectory_doesNotExist() async { | 40 test_createDirectory_doesNotExist() async { |
41 file.createDirectory(); | 41 file.createDirectory(); |
42 expect(await file.exists(), true); | 42 expect(await file.exists(), true); |
43 } | 43 } |
44 | 44 |
45 test_createDirectory_exists_asDirectory() async { | 45 test_createDirectory_exists_asDirectory() async { |
46 file.createDirectory(); | 46 file.createDirectory(); |
47 expect(() => file.createDirectory(), _throwsFileSystemException); | 47 file.createDirectory(); |
| 48 expect(await file.exists(), true); |
48 } | 49 } |
49 | 50 |
50 test_createDirectory_exists_asFile() async { | 51 test_createDirectory_exists_asFile() async { |
51 file.writeAsStringSync(''); | 52 file.writeAsStringSync(''); |
52 expect(() => file.createDirectory(), _throwsFileSystemException); | 53 expect(() => file.createDirectory(), _throwsFileSystemException); |
53 } | 54 } |
54 | 55 |
55 test_equals_differentPaths() { | 56 test_equals_differentPaths() { |
56 expect(file == entityForPath(join(tempPath, 'file2.txt')), isFalse); | 57 expect(file == entityForPath(join(tempPath, 'file2.txt')), isFalse); |
57 } | 58 } |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 String tempPath; | 300 String tempPath; |
300 | 301 |
301 String join(String path1, String path2, [String path3, String path4]) => | 302 String join(String path1, String path2, [String path3, String path4]) => |
302 pathos.windows.join(path1, path2, path3, path4); | 303 pathos.windows.join(path1, path2, path3, path4); |
303 | 304 |
304 void setUp() { | 305 void setUp() { |
305 tempPath = r'c:\test_file_system'; | 306 tempPath = r'c:\test_file_system'; |
306 fileSystem = new MemoryFileSystem(Uri.parse('file:///c:/cwd')); | 307 fileSystem = new MemoryFileSystem(Uri.parse('file:///c:/cwd')); |
307 } | 308 } |
308 } | 309 } |
OLD | NEW |