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

Side by Side Diff: test/cctest/test-double.cc

Issue 1102002: Rename files containing underscores. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 9 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 | « test/cctest/test-diy_fp.cc ('k') | test/cctest/test-fast-dtoa.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 2
3 #include <stdlib.h> 3 #include <stdlib.h>
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #include "platform.h" 7 #include "platform.h"
8 #include "cctest.h" 8 #include "cctest.h"
9 #include "diy_fp.h" 9 #include "diy-fp.h"
10 #include "double.h" 10 #include "double.h"
11 11
12 12
13 using namespace v8::internal; 13 using namespace v8::internal;
14 14
15 15
16 TEST(Uint64Conversions) { 16 TEST(Uint64Conversions) {
17 // Start by checking the byte-order. 17 // Start by checking the byte-order.
18 uint64_t ordered = V8_2PART_UINT64_C(0x01234567, 89ABCDEF); 18 uint64_t ordered = V8_2PART_UINT64_C(0x01234567, 89ABCDEF);
19 CHECK_EQ(3512700564088504e-318, Double(ordered).value()); 19 CHECK_EQ(3512700564088504e-318, Double(ordered).value());
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 uint64_t max_double64 = V8_2PART_UINT64_C(0x7fefffff, ffffffff); 195 uint64_t max_double64 = V8_2PART_UINT64_C(0x7fefffff, ffffffff);
196 diy_fp = Double(max_double64).AsNormalizedDiyFp(); 196 diy_fp = Double(max_double64).AsNormalizedDiyFp();
197 Double(max_double64).NormalizedBoundaries(&boundary_minus, &boundary_plus); 197 Double(max_double64).NormalizedBoundaries(&boundary_minus, &boundary_plus);
198 CHECK_EQ(diy_fp.e(), boundary_minus.e()); 198 CHECK_EQ(diy_fp.e(), boundary_minus.e());
199 CHECK_EQ(diy_fp.e(), boundary_plus.e()); 199 CHECK_EQ(diy_fp.e(), boundary_plus.e());
200 // max-value does not have a significand of the form 2^p (for some p). 200 // max-value does not have a significand of the form 2^p (for some p).
201 // Therefore its boundaries are at the same distance. 201 // Therefore its boundaries are at the same distance.
202 CHECK(diy_fp.f() - boundary_minus.f() == boundary_plus.f() - diy_fp.f()); 202 CHECK(diy_fp.f() - boundary_minus.f() == boundary_plus.f() - diy_fp.f());
203 CHECK((1 << 10) == diy_fp.f() - boundary_minus.f()); // NOLINT 203 CHECK((1 << 10) == diy_fp.f() - boundary_minus.f()); // NOLINT
204 } 204 }
OLDNEW
« no previous file with comments | « test/cctest/test-diy_fp.cc ('k') | test/cctest/test-fast-dtoa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698