Index: tests/language/exception_test.dart |
diff --git a/tests/language/exception_test.dart b/tests/language/exception_test.dart |
index e0bae3b9fa088c433e024f080512c887ef7de857..c08a872556ce0cb481595844442db42588df4119 100644 |
--- a/tests/language/exception_test.dart |
+++ b/tests/language/exception_test.dart |
@@ -6,14 +6,14 @@ class ExceptionTest { |
int i = 0; |
try { |
throw "Hello"; |
- } catch (String s) { |
+ } on String catch (s) { |
print(s); |
i += 10; |
} |
try { |
throw "bye"; |
- } catch (String s) { |
+ } on String catch (s) { |
print(s); |
i += 10; |
} |
@@ -23,11 +23,11 @@ class ExceptionTest { |
try { |
// This throws NullPointerException. |
throw null; |
- } catch (String s) { |
+ } on String catch (s) { |
correctCatch = false; |
- } catch (NullPointerException e) { |
+ } on NullPointerException catch (e) { |
correctCatch = true; |
- } catch (var x) { |
+ } catch (x) { |
correctCatch = false; |
} |
Expect.isTrue(correctCatch); |