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

Side by Side Diff: test/cctest/test-diy-fp.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/gay_shortest.h ('k') | test/cctest/test-diy_fp.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 10
11 11
12 using namespace v8::internal; 12 using namespace v8::internal;
13 13
14 14
15 TEST(Subtract) { 15 TEST(Subtract) {
16 DiyFp diy_fp1 = DiyFp(3, 0); 16 DiyFp diy_fp1 = DiyFp(3, 0);
17 DiyFp diy_fp2 = DiyFp(1, 0); 17 DiyFp diy_fp2 = DiyFp(1, 0);
18 DiyFp diff = DiyFp::Minus(diy_fp1, diy_fp2); 18 DiyFp diff = DiyFp::Minus(diy_fp1, diy_fp2);
19 19
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // Halfway cases are allowed to round either way. So don't check for it. 58 // Halfway cases are allowed to round either way. So don't check for it.
59 59
60 // Big numbers. 60 // Big numbers.
61 diy_fp1 = DiyFp(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF), 11); 61 diy_fp1 = DiyFp(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF), 11);
62 diy_fp2 = DiyFp(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF), 13); 62 diy_fp2 = DiyFp(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF), 13);
63 // 128bit result: 0xfffffffffffffffe0000000000000001 63 // 128bit result: 0xfffffffffffffffe0000000000000001
64 product = DiyFp::Times(diy_fp1, diy_fp2); 64 product = DiyFp::Times(diy_fp1, diy_fp2);
65 CHECK(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFe) == product.f()); 65 CHECK(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFe) == product.f());
66 CHECK_EQ(11 + 13 + 64, product.e()); 66 CHECK_EQ(11 + 13 + 64, product.e());
67 } 67 }
OLDNEW
« no previous file with comments | « test/cctest/gay_shortest.h ('k') | test/cctest/test-diy_fp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698