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

Side by Side 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, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/assert.h" 5 #include "platform/assert.h"
6 #include "platform/utils.h" 6 #include "platform/utils.h"
7 #include "vm/unit_test.h" 7 #include "vm/unit_test.h"
8 8
9 namespace dart { 9 namespace dart {
10 10
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 EXPECT_EQ(0xf4, reinterpret_cast<uint8_t*>(&value64le)[0]); 212 EXPECT_EQ(0xf4, reinterpret_cast<uint8_t*>(&value64le)[0]);
213 EXPECT_EQ(0xf3, reinterpret_cast<uint8_t*>(&value64le)[1]); 213 EXPECT_EQ(0xf3, reinterpret_cast<uint8_t*>(&value64le)[1]);
214 EXPECT_EQ(0xf2, reinterpret_cast<uint8_t*>(&value64le)[2]); 214 EXPECT_EQ(0xf2, reinterpret_cast<uint8_t*>(&value64le)[2]);
215 EXPECT_EQ(0xf1, reinterpret_cast<uint8_t*>(&value64le)[3]); 215 EXPECT_EQ(0xf1, reinterpret_cast<uint8_t*>(&value64le)[3]);
216 EXPECT_EQ(0x0, reinterpret_cast<uint8_t*>(&value64le)[4]); 216 EXPECT_EQ(0x0, reinterpret_cast<uint8_t*>(&value64le)[4]);
217 EXPECT_EQ(0x0, reinterpret_cast<uint8_t*>(&value64le)[5]); 217 EXPECT_EQ(0x0, reinterpret_cast<uint8_t*>(&value64le)[5]);
218 EXPECT_EQ(0x0, reinterpret_cast<uint8_t*>(&value64le)[6]); 218 EXPECT_EQ(0x0, reinterpret_cast<uint8_t*>(&value64le)[6]);
219 EXPECT_EQ(0x0, reinterpret_cast<uint8_t*>(&value64le)[7]); 219 EXPECT_EQ(0x0, reinterpret_cast<uint8_t*>(&value64le)[7]);
220 } 220 }
221 221
222
223 UNIT_TEST_CASE(DoublesBitEqual) {
224 EXPECT(Utils::DoublesBitEqual(1.0, 1.0));
225 EXPECT(!Utils::DoublesBitEqual(1.0, -1.0));
226 EXPECT(Utils::DoublesBitEqual(0.0, 0.0));
227 EXPECT(!Utils::DoublesBitEqual(0.0, -0.0));
228 EXPECT(Utils::DoublesBitEqual(NAN, NAN));
229 }
230
222 } // namespace dart 231 } // namespace dart
OLDNEW
« 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