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

Unified Diff: tests/standalone/src/FileInputStreamTest.dart

Issue 8399033: First round of changes to the file interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/chat/chat_server_lib.dart ('k') | tests/standalone/src/FileTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/FileInputStreamTest.dart
diff --git a/tests/standalone/src/FileInputStreamTest.dart b/tests/standalone/src/FileInputStreamTest.dart
index d4dde8e6d38ea26eff02a8e1b67f894dac930103..a61ac68987c8100e018226d380ab2d394e9e53f6 100644
--- a/tests/standalone/src/FileInputStreamTest.dart
+++ b/tests/standalone/src/FileInputStreamTest.dart
@@ -6,16 +6,17 @@
// Helper method to be able to run the test from the runtime
// directory, or the top directory.
String getFilename(String path) =>
- FileUtil.fileExists(path) ? path : '../' + path;
+ new File(path).existsSync() ? path : '../' + path;
main() {
String fName = getFilename("tests/standalone/src/readuntil_test.dat");
// File contains "Hello Dart\nwassup!"
- File file = new File(fName, false);
- StringInputStream x = new StringInputStream(file.inputStream);
+ File file = new File(fName);
+ file.openSync();
+ StringInputStream x = new StringInputStream(file.openInputStream());
String line = x.readLine();
Expect.equals("Hello Dart", line);
- file.close();
+ file.closeSync();
line = x.readLine();
Expect.equals("wassup!", line);
}
« no previous file with comments | « samples/chat/chat_server_lib.dart ('k') | tests/standalone/src/FileTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698