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

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

Issue 1184183006: Better errors for pkg/fixnum (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: bump version Created 5 years, 6 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/pubspec.yaml ('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 8ce782482e7ab8ea203f36c7d782181a68020731..9773deb1781e20e532df6f2aa56c1ceef96c2e6e 100644
--- a/pkg/fixnum/test/int_32_test.dart
+++ b/pkg/fixnum/test/int_32_test.dart
@@ -273,8 +273,8 @@ void main() {
expect(Int32.MIN_VALUE.toSigned(32), Int32.MIN_VALUE);
expect(Int32.MAX_VALUE.toSigned(31), -Int32.ONE);
expect(Int32.MIN_VALUE.toSigned(31), Int32.ZERO);
- expect(() => Int32.ONE.toSigned(0), throws);
- expect(() => Int32.ONE.toSigned(33), throws);
+ expect(() => Int32.ONE.toSigned(0), throwsRangeError);
+ expect(() => Int32.ONE.toSigned(33), throwsRangeError);
});
test("toUnsigned", () {
expect(Int32.ONE.toUnsigned(1), Int32.ONE);
@@ -283,8 +283,8 @@ void main() {
expect(Int32.MIN_VALUE.toUnsigned(32), Int32.MIN_VALUE);
expect(Int32.MAX_VALUE.toUnsigned(31), Int32.MAX_VALUE);
expect(Int32.MIN_VALUE.toUnsigned(31), Int32.ZERO);
- expect(() => Int32.ONE.toUnsigned(-1), throws);
- expect(() => Int32.ONE.toUnsigned(33), throws);
+ expect(() => Int32.ONE.toUnsigned(-1), throwsRangeError);
+ expect(() => Int32.ONE.toUnsigned(33), throwsRangeError);
});
test("toDouble", () {
expect(new Int32(17).toDouble(), same(17.0));
« no previous file with comments | « pkg/fixnum/pubspec.yaml ('k') | pkg/fixnum/test/int_64_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698