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

Unified Diff: tests/corelib/string_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/corelib/string_base_vm_test.dart ('k') | tests/html/audiocontext_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/string_test.dart
diff --git a/tests/corelib/string_test.dart b/tests/corelib/string_test.dart
index 62f8b816f0907be728aa3798ce0299c7294084de..94864f885bbdec3e99c9bf4fa8a1bc41e6895539 100644
--- a/tests/corelib/string_test.dart
+++ b/tests/corelib/string_test.dart
@@ -28,7 +28,7 @@ class StringTest {
bool exception_caught = false;
try {
var c = a[20]; // Throw exception.
- } catch (IndexOutOfRangeException e) {
+ } on IndexOutOfRangeException catch (e) {
exception_caught = true;
}
Expect.equals(true, exception_caught);
@@ -40,9 +40,9 @@ class StringTest {
try {
var c = a[2.2]; // Throw exception.
Expect.equals(true, false);
- } catch (IllegalArgumentException e) {
+ } on IllegalArgumentException catch (e) {
exception_caught = true;
- } catch (TypeError e) { // Thrown in checked mode only.
+ } on TypeError catch (e) { // Thrown in checked mode only.
exception_caught = true;
}
Expect.equals(true, exception_caught);
« no previous file with comments | « tests/corelib/string_base_vm_test.dart ('k') | tests/html/audiocontext_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698