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

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

Issue 11312122: Change List constructors. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Reupload. Adapt code for List.fixedLength. Created 8 years 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
« no previous file with comments | « tests/lib/async/slow_sink_test.dart ('k') | tests/standalone/io/file_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #import("dart:io"); 5 #import("dart:io");
6 6
7 class FileTest { 7 class FileTest {
8 static void testReadListInvalidArgs(buffer, offset, length) { 8 static void testReadListInvalidArgs(buffer, offset, length) {
9 String filename = getFilename("tests/vm/data/fixed_length_file"); 9 String filename = getFilename("tests/vm/data/fixed_length_file");
10 var file = (new File(filename)).openSync(); 10 var file = (new File(filename)).openSync();
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 }; 99 };
100 file.close(); 100 file.close();
101 } 101 }
102 102
103 static String getFilename(String path) => 103 static String getFilename(String path) =>
104 new File(path).existsSync() ? path : 'runtime/$path'; 104 new File(path).existsSync() ? path : 'runtime/$path';
105 } 105 }
106 106
107 main() { 107 main() {
108 FileTest.testReadListInvalidArgs(12, 0, 1); 108 FileTest.testReadListInvalidArgs(12, 0, 1);
109 FileTest.testReadListInvalidArgs(new List(10), '0', 1); 109 FileTest.testReadListInvalidArgs(new List.fixedLength(10), '0', 1);
110 FileTest.testReadListInvalidArgs(new List(10), 0, '1'); 110 FileTest.testReadListInvalidArgs(new List.fixedLength(10), 0, '1');
111 FileTest.testWriteByteInvalidArgs('asdf'); 111 FileTest.testWriteByteInvalidArgs('asdf');
112 FileTest.testWriteListInvalidArgs(12, 0, 1); 112 FileTest.testWriteListInvalidArgs(12, 0, 1);
113 FileTest.testWriteListInvalidArgs(new List(10), '0', 1); 113 FileTest.testWriteListInvalidArgs(new List.fixedLength(10), '0', 1);
114 FileTest.testWriteListInvalidArgs(new List(10), 0, '1'); 114 FileTest.testWriteListInvalidArgs(new List.fixedLength(10), 0, '1');
115 } 115 }
OLDNEW
« no previous file with comments | « tests/lib/async/slow_sink_test.dart ('k') | tests/standalone/io/file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698