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

Unified Diff: tests/language/null_pointer_exception_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/naming_test.dart ('k') | tests/language/operator4_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/null_pointer_exception_test.dart
diff --git a/tests/language/null_pointer_exception_test.dart b/tests/language/null_pointer_exception_test.dart
index 64d5d3956c8f8b3576fb36e172f4ff98e42da2ec..0872cead17a95c68d4e99b139bef1c9cee059326 100644
--- a/tests/language/null_pointer_exception_test.dart
+++ b/tests/language/null_pointer_exception_test.dart
@@ -10,9 +10,9 @@ class NullPointerExceptionTest {
bool wrongExceptionCaught = false;
try {
variable++;
- } catch (NullPointerException ex) {
+ } on NullPointerException catch (ex) {
exceptionCaught = true;
- } catch (Exception ex) {
+ } on Exception catch (ex) {
wrongExceptionCaught = true;
}
Expect.equals(true, exceptionCaught);
@@ -29,9 +29,9 @@ class NullPointerExceptionTest {
bool wrongExceptionCaught = false;
try {
variable = helperFunction(variable);
- } catch (NullPointerException ex) {
+ } on NullPointerException catch (ex) {
exceptionCaught = true;
- } catch (Exception ex) {
+ } on Exception catch (ex) {
wrongExceptionCaught = true;
}
Expect.equals(true, exceptionCaught);
« no previous file with comments | « tests/language/naming_test.dart ('k') | tests/language/operator4_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698