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

Unified Diff: runtime/vm/utils_test.cc

Issue 267793005: Use xorps xmm1, xmm1 to creat a 0.0 cconstant. Add to utils a bitwise double test. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/utils_test.cc
===================================================================
--- runtime/vm/utils_test.cc (revision 35714)
+++ runtime/vm/utils_test.cc (working copy)
@@ -219,4 +219,13 @@
EXPECT_EQ(0x0, reinterpret_cast<uint8_t*>(&value64le)[7]);
}
+
+UNIT_TEST_CASE(DoublesBitEqual) {
+ EXPECT(Utils::DoublesBitEqual(1.0, 1.0));
+ EXPECT(!Utils::DoublesBitEqual(1.0, -1.0));
+ EXPECT(Utils::DoublesBitEqual(0.0, 0.0));
+ EXPECT(!Utils::DoublesBitEqual(0.0, -0.0));
+ EXPECT(Utils::DoublesBitEqual(NAN, NAN));
+}
+
} // namespace dart
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698