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

Unified Diff: tests/language/naming_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
Index: tests/language/naming_test.dart
diff --git a/tests/language/naming_test.dart b/tests/language/naming_test.dart
index 1fecefd12b73493c4b0fc53fcfb2d6488e304868..0041265db396e58e56fcddfbce0a63ba616b4587 100644
--- a/tests/language/naming_test.dart
+++ b/tests/language/naming_test.dart
@@ -205,19 +205,19 @@ class NamingTest {
// Exceptions use a hardcoded "e" as exception name. If the namer works
// correctly then it will be renamed in case of clashes.
var e = 3;
- var caught = false;
+ var caught = 0;
try {
throw new MyException();
- } catch (var exc) {
+ } catch (exc) {
try {
throw new MyException();
- } catch (var exc2) {
- exc = 9;
+ } catch (exc2) {
+ caught++;
}
- Expect.equals(9, exc);
- caught = true;
+ Expect.equals(1, caught);
+ caught++;
}
- Expect.equals(true, caught);
+ Expect.equals(2, caught);
Expect.equals(3, e);
}
@@ -391,7 +391,7 @@ class NamingTest {
var wasCaught = false;
try {
throw new with(0, 0);
- } catch(with e) {
+ } on with catch (e) {
wasCaught = true;
Expect.equals(5, e.x);
}
« no previous file with comments | « tests/language/named_parameters_with_conversions_test.dart ('k') | tests/language/null_pointer_exception_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698