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

Unified Diff: tests/standalone/io/file_test.dart

Issue 206393003: Test file write of sub-list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/file_test.dart
diff --git a/tests/standalone/io/file_test.dart b/tests/standalone/io/file_test.dart
index de0c3b44068ef19aa00730d9ceee28efe2783afa..f8e93c92b0cb763e0fcadc2a02d16ec5f65922af 100644
--- a/tests/standalone/io/file_test.dart
+++ b/tests/standalone/io/file_test.dart
@@ -349,8 +349,11 @@ class FileTest {
// Open the file in append mode and ensure that we do not overwrite
// the existing content.
openedFile = (new File(filename)).openSync(mode: APPEND);
- openedFile.writeFromSync(buffer, 0, buffer.length);
- Expect.equals(content.length * 2, openedFile.lengthSync());
+ openedFile.writeFromSync(buffer, 2, buffer.length - 2);
+ Expect.equals(content.length + content.length - 4,
+ openedFile.lengthSync());
+ Expect.equals(content + content.substring(2, content.length - 2),
+ file.readAsStringSync());
openedFile.closeSync();
file.deleteSync();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698