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

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

Issue 10095009: Make it an error to call close twice on a file using the async API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 | « tests/standalone/src/io/FileErrorTest.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/io/FileInvalidArgumentsTest.dart
diff --git a/tests/standalone/src/io/FileInvalidArgumentsTest.dart b/tests/standalone/src/io/FileInvalidArgumentsTest.dart
index 413add9eb9e74f14eba5dd1e44a2891695df34e3..c2add31d588a3c4f0f2d841bba46b96f92e3d155 100644
--- a/tests/standalone/src/io/FileInvalidArgumentsTest.dart
+++ b/tests/standalone/src/io/FileInvalidArgumentsTest.dart
@@ -66,7 +66,8 @@ class FileTest {
var errors = 0;
file.onError = (s) {
errors++;
- Expect.isTrue(s.contains('Invalid arguments'));
+ Expect.isTrue(s is FileIOException);
+ Expect.isTrue(s.toString().contains('Invalid arguments'));
file.close(() {
Expect.equals(1, errors);
});
@@ -90,7 +91,8 @@ class FileTest {
var errors = 0;
file.onError = (s) {
errors++;
- Expect.isTrue(s.contains('Invalid argument'));
+ Expect.isTrue(s is FileIOException);
+ Expect.isTrue(s.toString().contains('Invalid argument'));
file.close(() {
Expect.equals(1, errors);
});
@@ -116,7 +118,8 @@ class FileTest {
var errors = 0;
file.onError = (s) {
errors++;
- Expect.isTrue(s.contains('Invalid arguments'));
+ Expect.isTrue(s is FileIOException);
+ Expect.isTrue(s.toString().contains('Invalid arguments'));
file.close(() {
Expect.equals(1, errors);
});
« no previous file with comments | « tests/standalone/src/io/FileErrorTest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698