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

Unified Diff: tests/standalone/io/file_invalid_arguments_test.dart

Issue 10891020: Update almost all tests (except co19) to use the new try-catch syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge. Created 8 years, 4 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/io/directory_invalid_arguments_test.dart ('k') | tests/standalone/io/file_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8ca630ef5aff089f6e061385fb43c91168e1878e..73f8b98c7489fd1a5d41f6397e545ae4ead5f1f4 100644
--- a/tests/standalone/io/file_invalid_arguments_test.dart
+++ b/tests/standalone/io/file_invalid_arguments_test.dart
@@ -10,7 +10,7 @@ class FileTest {
try {
file.openSync();
Expect.fail('exception expected');
- } catch (var e) {
+ } catch (e) {
Expect.isTrue(e is IllegalArgumentException);
}
@@ -29,7 +29,7 @@ class FileTest {
try {
file.existsSync();
Expect.fail('exception expected');
- } catch (var e) {
+ } catch (e) {
Expect.isTrue(e is IllegalArgumentException);
}
@@ -48,7 +48,7 @@ class FileTest {
try {
file.createSync();
Expect.fail('exception expected');
- } catch (var e) {
+ } catch (e) {
Expect.isTrue(e is IllegalArgumentException);
}
@@ -66,7 +66,7 @@ class FileTest {
try {
file.readListSync(buffer, offset, length);
Expect.fail('exception expected');
- } catch (var e) {
+ } catch (e) {
Expect.isTrue(e is FileIOException);
Expect.isTrue(e.toString().contains('Invalid arguments'));
}
@@ -93,7 +93,7 @@ class FileTest {
try {
file.writeByteSync(value);
Expect.fail('exception expected');
- } catch (var e) {
+ } catch (e) {
Expect.isTrue(e is FileIOException);
Expect.isTrue(e.toString().contains('Invalid argument'));
}
@@ -116,7 +116,7 @@ class FileTest {
try {
file.writeListSync(buffer, offset, bytes);
Expect.fail('exception expected');
- } catch (var e) {
+ } catch (e) {
Expect.isTrue(e is FileIOException);
Expect.isTrue(e.toString().contains('Invalid arguments'));
}
@@ -140,7 +140,7 @@ class FileTest {
try {
file.writeString(string);
Expect.fail('exception expected');
- } catch (var e) {
+ } catch (e) {
Expect.isTrue(e is FileIOException);
Expect.isTrue(e.toString().contains('writeString failed'));
}
@@ -166,7 +166,7 @@ class FileTest {
try {
file.fullPathSync();
Expect.fail('exception expected');
- } catch (var e) {
+ } catch (e) {
Expect.isTrue(e is IllegalArgumentException);
}
« no previous file with comments | « tests/standalone/io/directory_invalid_arguments_test.dart ('k') | tests/standalone/io/file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698