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

Side by Side Diff: tests/standalone/io/file_test.dart

Issue 11878015: Default constructor for dart:io Path now handles native Windows paths. Path() now does the same as… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't change tools/version.dart until the binaries are updated. Created 7 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // Dart test program for testing file I/O. 5 // Dart test program for testing file I/O.
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 10
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 Expect.isTrue(e is FileIOException); 974 Expect.isTrue(e is FileIOException);
975 } 975 }
976 } 976 }
977 977
978 static void testOpenFileFromPath() { 978 static void testOpenFileFromPath() {
979 var name = getFilename("tests/vm/data/fixed_length_file"); 979 var name = getFilename("tests/vm/data/fixed_length_file");
980 var path = new Path(name); 980 var path = new Path(name);
981 var f = new File.fromPath(path); 981 var f = new File.fromPath(path);
982 Expect.isTrue(f.existsSync()); 982 Expect.isTrue(f.existsSync());
983 name = f.fullPathSync(); 983 name = f.fullPathSync();
984 path = new Path.fromNative(name); 984 path = new Path(name);
985 var g = new File.fromPath(path); 985 var g = new File.fromPath(path);
986 Expect.isTrue(g.existsSync()); 986 Expect.isTrue(g.existsSync());
987 Expect.equals(name, g.fullPathSync()); 987 Expect.equals(name, g.fullPathSync());
988 } 988 }
989 989
990 static void testReadAsBytes() { 990 static void testReadAsBytes() {
991 var port = new ReceivePort(); 991 var port = new ReceivePort();
992 port.receive((result, replyTo) { 992 port.receive((result, replyTo) {
993 port.close(); 993 port.close();
994 Expect.equals(42, result); 994 Expect.equals(42, result);
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 testDirectorySync(); 1321 testDirectorySync();
1322 testWriteStringUtf8(); 1322 testWriteStringUtf8();
1323 testWriteStringUtf8Sync(); 1323 testWriteStringUtf8Sync();
1324 }); 1324 });
1325 } 1325 }
1326 } 1326 }
1327 1327
1328 main() { 1328 main() {
1329 FileTest.testMain(); 1329 FileTest.testMain();
1330 } 1330 }
OLDNEW
« no previous file with comments | « tests/standalone/io/directory_test.dart ('k') | tests/standalone/io/https_client_certificate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698