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

Unified Diff: tests/language/try_catch_syntax_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/language/try_catch_on_syntax_test.dart ('k') | tests/language/type_cast_vm_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/try_catch_syntax_test.dart
diff --git a/tests/language/try_catch_syntax_test.dart b/tests/language/try_catch_syntax_test.dart
index f7acc8c1cfd43428228c15d5d7f76bbf481b7a96..03dc9d93d16f9e30016c19af9cdf7ce26d476056 100644
--- a/tests/language/try_catch_syntax_test.dart
+++ b/tests/language/try_catch_syntax_test.dart
@@ -16,13 +16,13 @@ testMissingCatch() {
}
testMissingTry() {
- catch (Exception e) { } /// 02: compile-time error
- catch (Exception e, StackTrace trace) { } /// 03: compile-time error
- finally { } /// 04: compile-time error
+ on Exception catch (e) { } /// 02: compile-time error
+ on Exception catch (e, trace) { } /// 03: compile-time error
+ finally { } /// 04: compile-time error
}
testDuplicateCatchVariable() {
- try { } catch (Exception e, StackTrace e) { } /// 05: compile-time error
+ try { } on Exception catch (e, e) { } /// 05: compile-time error
}
testIllegalFinally() {
@@ -30,11 +30,11 @@ testIllegalFinally() {
}
testIllegalCatch() {
- try { } catch () { } /// 07: compile-time error
- try { } catch (MammaMia e) { } /// 09: compile-time error
+ try { } catch () { } /// 07: compile-time error
+ try { } on MammaMia catch (e) { } /// 09: compile-time error
}
testIllegalRethrow() {
- try { throw; } catch (var e) { } /// 10: compile-time error
- try { } catch (var e) { } finally { throw; } /// 11: compile-time error
+ try { throw; } catch (e) { } /// 10: compile-time error
+ try { } catch (e) { } finally { throw; } /// 11: compile-time error
}
« no previous file with comments | « tests/language/try_catch_on_syntax_test.dart ('k') | tests/language/type_cast_vm_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698