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

Unified Diff: runtime/vm/object_test.cc

Issue 317643004: Unify handling of identical(NaN, NaN) between generated code and Dart API. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « runtime/vm/object.cc ('k') | tests/language/number_identity2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_test.cc
===================================================================
--- runtime/vm/object_test.cc (revision 37108)
+++ runtime/vm/object_test.cc (working copy)
@@ -527,7 +527,11 @@
EXPECT(nan0.IsIdenticalTo(nan0));
EXPECT(nan0.CanonicalizeEquals(nan0));
EXPECT(!nan0.OperatorEquals(nan0));
- // TODO(18738): Test bitwise different NaNs after agreement on spec.
+ const Double& nan1 = Double::Handle(Double::New(0.0/0.0));
+ const Double& nan2 = Double::Handle(Double::New(1.0/0.0));
koda 2014/06/06 23:26:29 Doesn't 1.0/0.0 give you positive infinity? It se
regis 2014/06/06 23:51:56 Yes, thank you, 1.0/0.0 is infinity, but not a NaN
+ EXPECT(!nan1.IsIdenticalTo(nan2));
+ EXPECT(!nan1.CanonicalizeEquals(nan2));
+ EXPECT(!nan1.OperatorEquals(nan2));
}
{
const String& dbl_str0 = String::Handle(String::New("bla"));
« no previous file with comments | « runtime/vm/object.cc ('k') | tests/language/number_identity2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698