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

Unified Diff: pkg/fixnum/test/int_64_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/fixnum/test/int_32_test.dart ('k') | pkg/fixnum/test/int_64_vm_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/fixnum/test/int_64_test.dart
diff --git a/pkg/fixnum/test/int_64_test.dart b/pkg/fixnum/test/int_64_test.dart
index 889fa551e9fe7b17a7ac790639341efe50d75de7..c52e2e599bb98da2b6bd8b2a7a075bea1bfacae9 100644
--- a/pkg/fixnum/test/int_64_test.dart
+++ b/pkg/fixnum/test/int_64_test.dart
@@ -142,29 +142,29 @@ void testComparisons() {
Expect.isTrue(!(largePosPlusOne == largePos));
Expect.isTrue(largePosPlusOne >= largePos);
Expect.isTrue(largePosPlusOne > largePos);
-
+
try {
new int64.fromInt(17) < null;
Expect.fail("x < null should throw NullPointerException");
- } catch (NullPointerException e) {
+ } on NullPointerException catch (e) {
}
try {
new int64.fromInt(17) <= null;
Expect.fail("x <= null should throw NullPointerException");
- } catch (NullPointerException e) {
+ } on NullPointerException catch (e) {
}
try {
new int64.fromInt(17) > null;
Expect.fail("x > null should throw NullPointerException");
- } catch (NullPointerException e) {
+ } on NullPointerException catch (e) {
}
try {
new int64.fromInt(17) < null;
Expect.fail("x >= null should throw NullPointerException");
- } catch (NullPointerException e) {
+ } on NullPointerException catch (e) {
}
Expect.isFalse(new int64.fromInt(17) == null);
@@ -377,7 +377,7 @@ void testMultiplicative() {
0x12345678, 0x12345678) ~/ new int64.fromInts(0x0, 0x123));
Expect.equals(new int64.fromInts(0x0, 0x10003), new int64.fromInts(
0x12345678, 0x12345678) ~/ new int64.fromInts(0x1234, 0x12345678));
- Expect.equals(new int64.fromInts(0xffffffff, 0xffff3dfe),
+ Expect.equals(new int64.fromInts(0xffffffff, 0xffff3dfe),
new int64.fromInts(0xf2345678, 0x12345678) ~/
new int64.fromInts(0x1234, 0x12345678));
Expect.equals(new int64.fromInts(0x0, 0xeda), new int64.fromInts(0xf2345678,
@@ -386,10 +386,10 @@ void testMultiplicative() {
try {
new int64.fromInt(1) ~/ new int64.fromInt(0);
Expect.fail("Expected an IntegerDivisionByZeroException");
- } catch (IntegerDivisionByZeroException e) {
+ } on IntegerDivisionByZeroException catch (e) {
}
- Expect.equals(new int64.fromInts(0xc0000000, 0x00000000),
+ Expect.equals(new int64.fromInts(0xc0000000, 0x00000000),
int64.MIN_VALUE ~/ new int64.fromInt(2));
Expect.equals(int64.MIN_VALUE, int64.MIN_VALUE ~/
new int64.fromInt(1));
@@ -516,19 +516,19 @@ void testShift() {
try {
new int64.fromInt(17) >> -1;
Expect.fail("x >> -1 should throw IllegalArgumentException");
- } catch (IllegalArgumentException e) {
+ } on IllegalArgumentException catch (e) {
}
try {
new int64.fromInt(17) << -1;
Expect.fail("x >> -1 should throw IllegalArgumentException");
- } catch (IllegalArgumentException e) {
+ } on IllegalArgumentException catch (e) {
}
try {
new int64.fromInt(17).shiftRightUnsigned(-1);
Expect.fail("x >> -1 should throw IllegalArgumentException");
- } catch (IllegalArgumentException e) {
+ } on IllegalArgumentException catch (e) {
}
}
« no previous file with comments | « pkg/fixnum/test/int_32_test.dart ('k') | pkg/fixnum/test/int_64_vm_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698