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

Side by Side Diff: test/unittests/base/division-by-constant-unittest.cc

Issue 670673002: Remove v8stdint.h, it doesn't serve a purpose anymore. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed Windows builds Created 6 years, 2 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-platform.cc ('k') | test/unittests/base/flags-unittest.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Check all examples from table 10-1 of "Hacker's Delight". 5 // Check all examples from table 10-1 of "Hacker's Delight".
6 6
7 #include "src/base/division-by-constant.h" 7 #include "src/base/division-by-constant.h"
8 8
9 #include <stdint.h>
10
9 #include <ostream> // NOLINT 11 #include <ostream> // NOLINT
10 12
11 #include "testing/gtest-support.h" 13 #include "testing/gtest-support.h"
12 14
13 namespace v8 { 15 namespace v8 {
14 namespace base { 16 namespace base {
15 17
16 template <class T> 18 template <class T>
17 std::ostream& operator<<(std::ostream& os, 19 std::ostream& operator<<(std::ostream& os,
18 const MagicNumbersForDivision<T>& mag) { 20 const MagicNumbersForDivision<T>& mag) {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 EXPECT_EQ(M64(0xCCCCCCCCCCCCCCCDULL, 3, false), u64(10)); 125 EXPECT_EQ(M64(0xCCCCCCCCCCCCCCCDULL, 3, false), u64(10));
124 EXPECT_EQ(M64(0x2E8BA2E8BA2E8BA3ULL, 1, false), u64(11)); 126 EXPECT_EQ(M64(0x2E8BA2E8BA2E8BA3ULL, 1, false), u64(11));
125 EXPECT_EQ(M64(0xAAAAAAAAAAAAAAABULL, 3, false), u64(12)); 127 EXPECT_EQ(M64(0xAAAAAAAAAAAAAAABULL, 3, false), u64(12));
126 EXPECT_EQ(M64(0x47AE147AE147AE15ULL, 5, true), u64(25)); 128 EXPECT_EQ(M64(0x47AE147AE147AE15ULL, 5, true), u64(25));
127 EXPECT_EQ(M64(0x0624DD2F1A9FBE77ULL, 7, true), u64(125)); 129 EXPECT_EQ(M64(0x0624DD2F1A9FBE77ULL, 7, true), u64(125));
128 EXPECT_EQ(M64(0x346DC5D63886594BULL, 7, false), u64(625)); 130 EXPECT_EQ(M64(0x346DC5D63886594BULL, 7, false), u64(625));
129 } 131 }
130 132
131 } // namespace base 133 } // namespace base
132 } // namespace v8 134 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/test-platform.cc ('k') | test/unittests/base/flags-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698