Index: tests/standalone/io/file_invalid_arguments_test.dart |
diff --git a/tests/standalone/io/file_invalid_arguments_test.dart b/tests/standalone/io/file_invalid_arguments_test.dart |
index 1406290934e676d6a26c7636af278c7c9caa3284..cea8a134df95f05097dc9b99de90668cd9b1bc85 100644 |
--- a/tests/standalone/io/file_invalid_arguments_test.dart |
+++ b/tests/standalone/io/file_invalid_arguments_test.dart |
@@ -33,12 +33,12 @@ void testReadInvalidArgs(arg) { |
}); |
} |
-void testReadListInvalidArgs(buffer, offset, length) { |
+void testReadIntoInvalidArgs(buffer, start, end) { |
var port = new ReceivePort(); |
String filename = getFilename("tests/vm/data/fixed_length_file"); |
var file = (new File(filename)).openSync(); |
try { |
- file.readListSync(buffer, offset, length); |
+ file.readIntoSync(buffer, start, end); |
Expect.fail('exception expected'); |
} catch (e) { |
Expect.isTrue(e is FileIOException); |
@@ -46,8 +46,8 @@ void testReadListInvalidArgs(buffer, offset, length) { |
} |
var errors = 0; |
- var readListFuture = file.readList(buffer, offset, length); |
- readListFuture.then((bytes) { |
+ var readIntoFuture = file.readInto(buffer, start, end); |
+ readIntoFuture.then((bytes) { |
Expect.fail('exception expected'); |
}).catchError((e) { |
errors++; |
@@ -84,20 +84,20 @@ void testWriteByteInvalidArgs(value) { |
}); |
} |
-void testWriteListInvalidArgs(buffer, offset, bytes) { |
+void testWriteFromInvalidArgs(buffer, start, end) { |
var port = new ReceivePort(); |
String filename = getFilename("tests/vm/data/fixed_length_file"); |
var file = (new File("${filename}_out")).openSync(mode: FileMode.WRITE); |
try { |
- file.writeListSync(buffer, offset, bytes); |
+ file.writeFromSync(buffer, start, end); |
Expect.fail('exception expected'); |
} catch (e) { |
Expect.isTrue(e is FileIOException); |
Expect.isTrue(e.toString().contains('Invalid arguments')); |
} |
- var writeListFuture = file.writeList(buffer, offset, bytes); |
- writeListFuture.then((ignore) { |
+ var writeFromFuture = file.writeFrom(buffer, start, end); |
+ writeFromFuture.then((ignore) { |
Expect.fail('exception expected'); |
}).catchError((s) { |
Expect.isTrue(s.error is FileIOException); |
@@ -136,12 +136,12 @@ String getFilename(String path) { |
main() { |
testReadInvalidArgs('asdf'); |
- testReadListInvalidArgs(12, 0, 1); |
- testReadListInvalidArgs(new List(10), '0', 1); |
- testReadListInvalidArgs(new List(10), 0, '1'); |
+ testReadIntoInvalidArgs(12, 0, 1); |
+ testReadIntoInvalidArgs(new List(10), '0', 1); |
+ testReadIntoInvalidArgs(new List(10), 0, '1'); |
testWriteByteInvalidArgs('asdf'); |
- testWriteListInvalidArgs(12, 0, 1); |
- testWriteListInvalidArgs(new List(10), '0', 1); |
- testWriteListInvalidArgs(new List(10), 0, '1'); |
+ testWriteFromInvalidArgs(12, 0, 1); |
+ testWriteFromInvalidArgs(new List(10), '0', 1); |
+ testWriteFromInvalidArgs(new List(10), 0, '1'); |
testWriteStringInvalidArgs("Hello, world", 42); |
} |