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

Unified Diff: test/int32_test.dart

Issue 1834783004: Merge in changes from SDK branch (Closed) Base URL: https://github.com/dart-lang/fixnum@master
Patch Set: Created 4 years, 8 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 | « pubspec.yaml ('k') | test/int64_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/int32_test.dart
diff --git a/test/int32_test.dart b/test/int32_test.dart
index a5a5a00f426e15bd8661d62e75a480dc7373c990..df958943c1b17553ed4adbbded50704a1d69a5a0 100644
--- a/test/int32_test.dart
+++ b/test/int32_test.dart
@@ -57,8 +57,6 @@ void main() {
Int32 n2 = new Int32(9876);
Int32 n3 = new Int32(-1234);
Int32 n4 = new Int32(-9876);
- Int32 n5 = new Int32(0x12345678);
- Int32 n6 = new Int32(0x22222222);
test("+", () {
expect(n1 + n2, new Int32(11110));
@@ -317,8 +315,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);
@@ -327,8 +325,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 | « pubspec.yaml ('k') | test/int64_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698