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

Unified Diff: pkg/fixnum/test/int_64_vm_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_64_test.dart ('k') | pkg/intl/lib/date_format_field.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/fixnum/test/int_64_vm_test.dart
diff --git a/pkg/fixnum/test/int_64_vm_test.dart b/pkg/fixnum/test/int_64_vm_test.dart
index bf69f0cdab7e886ba854ac11277fc8b46ae305f9..370f72c6298faea86a3aa4f9887aa83effea7aaa 100644
--- a/pkg/fixnum/test/int_64_vm_test.dart
+++ b/pkg/fixnum/test/int_64_vm_test.dart
@@ -188,7 +188,7 @@ class int64VMTest {
Expect.fail("${op.name}: val = $val");
}
}
-
+
void doTestUnary(UnaryOp op) {
print("Testing operator ${op.name}");
for (int i = 0; i < TEST_VALUES.length; i++) {
@@ -199,14 +199,14 @@ class int64VMTest {
_doTestUnary(op, randomLong);
}
}
-
+
void _doTestBinary(BinaryOp op, int64 val0, int64 val1) {
// print("Test val0 = $val0, val1 = $val1");
var refException = null;
int ref = -1;
try {
ref = op.ref(val0.toInt(), val1.toInt());
- } catch (Exception e) {
+ } on Exception catch (e) {
refException = e;
}
var testException = null;
@@ -224,7 +224,7 @@ class int64VMTest {
if (val1 != val1_save) {
print("Test altered second argument");
}
- } catch (Exception e) {
+ } on Exception catch (e) {
testException = e;
}
if (testException is IntegerDivisionByZeroException &&
« no previous file with comments | « pkg/fixnum/test/int_64_test.dart ('k') | pkg/intl/lib/date_format_field.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698