| Index: tests/standalone/src/FileTest.dart
|
| diff --git a/tests/standalone/src/FileTest.dart b/tests/standalone/src/FileTest.dart
|
| index b740ca3dd5d9ac06a16ab985aaa47e1805e87354..35a13cdad998dbc00ccd3d6b8a3ae3024c9def2a 100644
|
| --- a/tests/standalone/src/FileTest.dart
|
| +++ b/tests/standalone/src/FileTest.dart
|
| @@ -33,7 +33,7 @@ class FileTest {
|
| // Read a file and check part of it's contents.
|
| String filename = getFilename("bin/file_test.cc");
|
| File file = new File(filename);
|
| - InputStream input = file.openInputStream();
|
| + InputStream input = file.openInputStreamSync();
|
| List<int> buffer = new List<int>(42);
|
| int bytesRead = input.readInto(buffer, 0, 12);
|
| Expect.equals(12, bytesRead);
|
| @@ -64,7 +64,7 @@ class FileTest {
|
|
|
| // Test reading all using readInto.
|
| file = new File(inFilename);
|
| - input = file.openInputStream();
|
| + input = file.openInputStreamSync();
|
| List<int> buffer1 = new List<int>(42);
|
| bytesRead = input.readInto(buffer1, 0, 42);
|
| Expect.equals(42, bytesRead);
|
| @@ -72,7 +72,7 @@ class FileTest {
|
|
|
| // Test reading all using readInto and read.
|
| file = new File(inFilename);
|
| - input = file.openInputStream();
|
| + input = file.openInputStreamSync();
|
| bytesRead = input.readInto(buffer1, 0, 21);
|
| Expect.equals(21, bytesRead);
|
| buffer1 = input.read();
|
| @@ -81,7 +81,7 @@ class FileTest {
|
|
|
| // Test reading all using read and readInto.
|
| file = new File(inFilename);
|
| - input = file.openInputStream();
|
| + input = file.openInputStreamSync();
|
| buffer1 = input.read(21);
|
| Expect.equals(21, buffer1.length);
|
| bytesRead = input.readInto(buffer1, 0, 21);
|
| @@ -90,7 +90,7 @@ class FileTest {
|
|
|
| // Test reading all using read.
|
| file = new File(inFilename);
|
| - input = file.openInputStream();
|
| + input = file.openInputStreamSync();
|
| buffer1 = input.read();
|
| Expect.equals(42, buffer1.length);
|
| Expect.isTrue(input.closed);
|
| @@ -98,7 +98,7 @@ class FileTest {
|
| // Write the contents of the file just read into another file.
|
| String outFilename = tempDirectory.path + "/out_read_write_stream";
|
| file = new File(outFilename);
|
| - OutputStream output = file.openOutputStream();
|
| + OutputStream output = file.openOutputStreamSync();
|
| bool writeDone = output.writeFrom(buffer1, 0, 42);
|
| Expect.equals(true, writeDone);
|
| output.close();
|
| @@ -106,7 +106,7 @@ class FileTest {
|
| // Now read the contents of the file just written.
|
| List<int> buffer2 = new List<int>(42);
|
| file = new File(outFilename);
|
| - input = file.openInputStream();
|
| + input = file.openInputStreamSync();
|
| bytesRead = input.readInto(buffer2, 0, 42);
|
| Expect.isTrue(input.closed);
|
| Expect.equals(42, bytesRead);
|
| @@ -292,11 +292,11 @@ class FileTest {
|
| File file = new File(filename);
|
| file.createSync();
|
| List<int> buffer = content.charCodes();
|
| - OutputStream outStream = file.openOutputStream();
|
| + OutputStream outStream = file.openOutputStreamSync();
|
| outStream.write(buffer);
|
| outStream.close();
|
| File file2 = new File(filename);
|
| - OutputStream appendingOutput = file2.openOutputStream(FileMode.APPEND);
|
| + OutputStream appendingOutput = file2.openOutputStreamSync(FileMode.APPEND);
|
| appendingOutput.write(buffer);
|
| appendingOutput.close();
|
| File file3 = new File(filename);
|
| @@ -611,10 +611,10 @@ class FileTest {
|
| List<int> buffer = new List<int>(42);
|
| File file = new File(tempDirectory.path + "/out_close_exception_stream");
|
| file.createSync();
|
| - InputStream input = file.openInputStream();
|
| + InputStream input = file.openInputStreamSync();
|
| Expect.isTrue(input.closed);
|
| Expect.isNull(input.readInto(buffer, 0, 12));
|
| - OutputStream output = file.openOutputStream();
|
| + OutputStream output = file.openOutputStreamSync();
|
| output.close();
|
| Expect.throws(( ) => output.writeFrom(buffer, 0, 12),
|
| (e) => e is FileIOException);
|
|
|