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

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

Issue 20803006: Don't throw exception for non-integer args to fixnum int32,int64 op == (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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/lib/src/int64.dart ('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 77a6b2742182d4d5f94ce120660558e98ad55930..7e27d418dc9b87e110a1aebd9adcd638a6855298 100644
--- a/pkg/fixnum/test/int_32_test.dart
+++ b/pkg/fixnum/test/int_32_test.dart
@@ -94,6 +94,9 @@ void main() {
expect(new int32.fromInt(17) < new int32.fromInt(18), true);
expect(new int32.fromInt(17) < new int32.fromInt(17), false);
expect(new int32.fromInt(17) < new int32.fromInt(16), false);
+ expect(new int32.fromInt(17) < new int64.fromInt(18), true);
+ expect(new int32.fromInt(17) < new int64.fromInt(17), false);
+ expect(new int32.fromInt(17) < new int64.fromInt(16), false);
expect(int32.MIN_VALUE < int32.MAX_VALUE, true);
expect(int32.MAX_VALUE < int32.MIN_VALUE, false);
expect(() => new int32.fromInt(17) < null, throws);
@@ -103,6 +106,9 @@ void main() {
expect(new int32.fromInt(17) <= new int32.fromInt(18), true);
expect(new int32.fromInt(17) <= new int32.fromInt(17), true);
expect(new int32.fromInt(17) <= new int32.fromInt(16), false);
+ expect(new int32.fromInt(17) <= new int64.fromInt(18), true);
+ expect(new int32.fromInt(17) <= new int64.fromInt(17), true);
+ expect(new int32.fromInt(17) <= new int64.fromInt(16), false);
expect(int32.MIN_VALUE <= int32.MAX_VALUE, true);
expect(int32.MAX_VALUE <= int32.MIN_VALUE, false);
expect(() => new int32.fromInt(17) <= null, throws);
@@ -112,7 +118,11 @@ void main() {
expect(new int32.fromInt(17) == new int32.fromInt(18), false);
expect(new int32.fromInt(17) == new int32.fromInt(17), true);
expect(new int32.fromInt(17) == new int32.fromInt(16), false);
+ expect(new int32.fromInt(17) == new int64.fromInt(18), false);
+ expect(new int32.fromInt(17) == new int64.fromInt(17), true);
+ expect(new int32.fromInt(17) == new int64.fromInt(16), false);
expect(int32.MIN_VALUE == int32.MAX_VALUE, false);
+ expect(new int32.fromInt(17) == new Object(), false);
expect(new int32.fromInt(17) == null, false);
});
@@ -120,6 +130,9 @@ void main() {
expect(new int32.fromInt(17) >= new int32.fromInt(18), false);
expect(new int32.fromInt(17) >= new int32.fromInt(17), true);
expect(new int32.fromInt(17) >= new int32.fromInt(16), true);
+ expect(new int32.fromInt(17) >= new int64.fromInt(18), false);
+ expect(new int32.fromInt(17) >= new int64.fromInt(17), true);
+ expect(new int32.fromInt(17) >= new int64.fromInt(16), true);
expect(int32.MIN_VALUE >= int32.MAX_VALUE, false);
expect(int32.MAX_VALUE >= int32.MIN_VALUE, true);
expect(() => new int32.fromInt(17) >= null, throws);
@@ -129,6 +142,9 @@ void main() {
expect(new int32.fromInt(17) > new int32.fromInt(18), false);
expect(new int32.fromInt(17) > new int32.fromInt(17), false);
expect(new int32.fromInt(17) > new int32.fromInt(16), true);
+ expect(new int32.fromInt(17) > new int64.fromInt(18), false);
+ expect(new int32.fromInt(17) > new int64.fromInt(17), false);
+ expect(new int32.fromInt(17) > new int64.fromInt(16), true);
expect(int32.MIN_VALUE > int32.MAX_VALUE, false);
expect(int32.MAX_VALUE > int32.MIN_VALUE, true);
expect(() => new int32.fromInt(17) > null, throws);
« no previous file with comments | « pkg/fixnum/lib/src/int64.dart ('k') | pkg/fixnum/test/int_64_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698