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

Unified Diff: runtime/bin/file_test.cc

Issue 9034005: Change the behavior of open on files to not truncate by default (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comment.s Created 8 years, 12 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 | « runtime/bin/file_macos.cc ('k') | runtime/bin/file_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_test.cc
diff --git a/runtime/bin/file_test.cc b/runtime/bin/file_test.cc
index 1904775bfa0cfe9e5de211c2fcb38625ed6b9f64..110a7a778814d89730b006ff72b7a1e0b6b4121d 100644
--- a/runtime/bin/file_test.cc
+++ b/runtime/bin/file_test.cc
@@ -23,7 +23,7 @@ static const char* GetFileName(const char* name) {
UNIT_TEST_CASE(Read) {
const char* kFilename = GetFileName("runtime/bin/file_test.cc");
- File* file = File::Open(kFilename, false);
+ File* file = File::Open(kFilename, File::kRead);
EXPECT(file != NULL);
EXPECT_STREQ(kFilename, file->name());
char buffer[16];
@@ -39,7 +39,7 @@ UNIT_TEST_CASE(Read) {
UNIT_TEST_CASE(FileLength) {
const char* kFilename =
GetFileName("runtime/tests/vm/data/fixed_length_file");
- File* file = File::Open(kFilename, false);
+ File* file = File::Open(kFilename, File::kRead);
EXPECT(file != NULL);
EXPECT_EQ(42, file->Length());
delete file;
@@ -50,7 +50,7 @@ UNIT_TEST_CASE(FilePosition) {
char buf[42];
const char* kFilename =
GetFileName("runtime/tests/vm/data/fixed_length_file");
- File* file = File::Open(kFilename, false);
+ File* file = File::Open(kFilename, File::kRead);
EXPECT(file != NULL);
EXPECT(file->ReadFully(buf, 12));
EXPECT_EQ(12, file->Position());
« no previous file with comments | « runtime/bin/file_macos.cc ('k') | runtime/bin/file_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698