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

Unified Diff: pkg/fixnum/test/int_32_test.dart

Issue 10917006: More uses of the new try-catch syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « pkg/dartdoc/dartdoc.dart ('k') | pkg/fixnum/test/int_64_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/fixnum/test/int_32_test.dart
diff --git a/pkg/fixnum/test/int_32_test.dart b/pkg/fixnum/test/int_32_test.dart
index 0a92518169be8443b12315b471d15d4a51a86fda..edbb925e668ebca25b38bc3b1a0f0635384333e6 100644
--- a/pkg/fixnum/test/int_32_test.dart
+++ b/pkg/fixnum/test/int_32_test.dart
@@ -32,19 +32,19 @@ void main() {
try {
new int32.fromInt(17) >> -1;
Expect.fail("x >> -1 should throw IllegalArgumentException");
- } catch (IllegalArgumentException e) {
+ } on IllegalArgumentException catch (e) {
}
try {
new int32.fromInt(17) << -1;
Expect.fail("x >> -1 should throw IllegalArgumentException");
- } catch (IllegalArgumentException e) {
+ } on IllegalArgumentException catch (e) {
}
try {
new int32.fromInt(17).shiftRightUnsigned(-1);
Expect.fail("x >> -1 should throw IllegalArgumentException");
- } catch (IllegalArgumentException e) {
+ } on IllegalArgumentException catch (e) {
}
// wraparound
@@ -129,29 +129,29 @@ void main() {
new int32.fromInt(0x12345678) << 7);
Expect.equals(new int32.fromInt(0x12345678 >> 7),
new int32.fromInt(0x12345678).shiftRightUnsigned(7));
-
+
try {
new int32.fromInt(17) < null;
Expect.fail("x < null should throw NullPointerException");
- } catch (NullPointerException e) {
+ } on NullPointerException catch (e) {
}
try {
new int32.fromInt(17) <= null;
Expect.fail("x <= null should throw NullPointerException");
- } catch (NullPointerException e) {
+ } on NullPointerException catch (e) {
}
try {
new int32.fromInt(17) > null;
Expect.fail("x > null should throw NullPointerException");
- } catch (NullPointerException e) {
+ } on NullPointerException catch (e) {
}
try {
new int32.fromInt(17) < null;
Expect.fail("x >= null should throw NullPointerException");
- } catch (NullPointerException e) {
+ } on NullPointerException catch (e) {
}
Expect.isFalse(new int32.fromInt(17) == null);
« no previous file with comments | « pkg/dartdoc/dartdoc.dart ('k') | pkg/fixnum/test/int_64_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698