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

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

Issue 34223002: Throw FormatException when Int32/Int64.parseRadix() encounters bad digit (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Throw FormatException when Int32/Int64.parseRadix() encounters bad digit Created 7 years, 2 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') | no next file » | 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 891b8e744f17c443c21b02becbef2bb08835817d..7370c850b5e33553b07d2a62a10110e4e4575d24 100644
--- a/pkg/fixnum/test/int_64_test.dart
+++ b/pkg/fixnum/test/int_64_test.dart
@@ -634,8 +634,7 @@ void main() {
expect(fact18 ~/ fact17, new Int64(18));
});
- test("min, max values", () {
- expect(new Int64(1) << 63, Int64.MIN_VALUE);
+ test("min, max values", () { expect(new Int64(1) << 63, Int64.MIN_VALUE);
sra1 2013/10/23 04:09:11 Put the first statement of the block back on its o
Chris Bracken 2013/10/23 23:34:12 Done.
expect(-(Int64.MIN_VALUE + new Int64(1)), Int64.MAX_VALUE);
});
@@ -658,6 +657,9 @@ void main() {
checkInt(4294967296);
checkInt(-4294967295);
checkInt(-4294967296);
+ expect(() => Int64.parseRadix('xyzzy', -1), throwsArgumentError);
+ expect(() => Int64.parseRadix('plugh', 10),
+ throwsA(new isInstanceOf<FormatException>()));
});
test("parseRadix", () {
« no previous file with comments | « pkg/fixnum/test/int_32_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698