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

Unified Diff: tests/standalone/src/FileInvalidArgumentsTest.dart

Issue 9474004: Make FileInputStream and FileOutputStream actually asynchronous. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove accidental edit Created 8 years, 10 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
Index: tests/standalone/src/FileInvalidArgumentsTest.dart
diff --git a/tests/standalone/src/FileInvalidArgumentsTest.dart b/tests/standalone/src/FileInvalidArgumentsTest.dart
index 73f4ab10c8ed8183abe6abd07a85a6c3317d9a8d..f956ee3fb42ca317352c2ced456d160853bab950 100644
--- a/tests/standalone/src/FileInvalidArgumentsTest.dart
+++ b/tests/standalone/src/FileInvalidArgumentsTest.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -104,8 +104,9 @@ class FileTest {
errors++;
Expect.isTrue(s.contains('Invalid argument'));
};
- file.noPendingWriteHandler = (bytes) {
- Expect.fail('write list invalid argument');
+ var calls = 0;
+ file.noPendingWriteHandler = () {
+ if (++calls > 1) Expect.fail('write list invalid argument');
};
file.writeByte(value);
file.closeHandler = () {
@@ -130,8 +131,9 @@ class FileTest {
errors++;
Expect.isTrue(s.contains('Invalid arguments'));
};
- file.noPendingWriteHandler = (bytes) {
- Expect.fail('write list invalid argument');
+ var calls = 0;
+ file.noPendingWriteHandler = () {
+ if (++calls > 1) Expect.fail('write string invalid argument');
};
file.writeList(buffer, offset, bytes);
file.closeHandler = () {
@@ -157,8 +159,9 @@ class FileTest {
errors++;
Expect.isTrue(s.contains('writeString failed'));
};
- file.noPendingWriteHandler = (bytes) {
- Expect.fail('write string invalid argument');
+ var calls = 0;
+ file.noPendingWriteHandler = () {
+ if (++calls > 1) Expect.fail('write list invalid argument');
};
file.writeString(string);
file.closeHandler = () {

Powered by Google App Engine
This is Rietveld 408576698