Commit 4998151f authored by isherman@chromium.org's avatar isherman@chromium.org

Fix compile warnings for 64-bit constants.


Review URL: https://chromiumcodereview.appspot.com/11428117

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170601 0039d316-1c4b-4281-b951-d872f2087c98
parent b7c71009
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
// found in the LICENSE file. // found in the LICENSE file.
#include "cc/hash_pair.h" #include "cc/hash_pair.h"
#include "base/basictypes.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
namespace { namespace {
...@@ -28,7 +30,8 @@ TEST_F(HashPairTest, IntegerPairs) { ...@@ -28,7 +30,8 @@ TEST_F(HashPairTest, IntegerPairs) {
INSERT_PAIR_TEST(ShortShortPair, 4, 6); INSERT_PAIR_TEST(ShortShortPair, 4, 6);
INSERT_PAIR_TEST(ShortIntPair, 7, (1 << 30) + 4342); INSERT_PAIR_TEST(ShortIntPair, 7, (1 << 30) + 4342);
INSERT_PAIR_TEST(ShortInt32Pair, 9, (1 << 29) + 378128932); INSERT_PAIR_TEST(ShortInt32Pair, 9, (1 << 29) + 378128932);
INSERT_PAIR_TEST(ShortInt64Pair, 10, (1LL << 60) + 78931732321); INSERT_PAIR_TEST(ShortInt64Pair, 10,
(GG_INT64_C(1) << 60) + GG_INT64_C(78931732321));
typedef std::pair<int, short> IntShortPair; typedef std::pair<int, short> IntShortPair;
typedef std::pair<int, int> IntIntPair; typedef std::pair<int, int> IntIntPair;
...@@ -38,7 +41,8 @@ TEST_F(HashPairTest, IntegerPairs) { ...@@ -38,7 +41,8 @@ TEST_F(HashPairTest, IntegerPairs) {
INSERT_PAIR_TEST(IntShortPair, 4, 6); INSERT_PAIR_TEST(IntShortPair, 4, 6);
INSERT_PAIR_TEST(IntIntPair, 7, (1 << 30) + 4342); INSERT_PAIR_TEST(IntIntPair, 7, (1 << 30) + 4342);
INSERT_PAIR_TEST(IntInt32Pair, 9, (1 << 29) + 378128932); INSERT_PAIR_TEST(IntInt32Pair, 9, (1 << 29) + 378128932);
INSERT_PAIR_TEST(IntInt64Pair, 10, (1LL << 60) + 78931732321); INSERT_PAIR_TEST(IntInt64Pair, 10,
(GG_INT64_C(1) << 60) + GG_INT64_C(78931732321));
typedef std::pair<int32, short> Int32ShortPair; typedef std::pair<int32, short> Int32ShortPair;
typedef std::pair<int32, int> Int32IntPair; typedef std::pair<int32, int> Int32IntPair;
...@@ -48,7 +52,8 @@ TEST_F(HashPairTest, IntegerPairs) { ...@@ -48,7 +52,8 @@ TEST_F(HashPairTest, IntegerPairs) {
INSERT_PAIR_TEST(Int32ShortPair, 4, 6); INSERT_PAIR_TEST(Int32ShortPair, 4, 6);
INSERT_PAIR_TEST(Int32IntPair, 7, (1 << 30) + 4342); INSERT_PAIR_TEST(Int32IntPair, 7, (1 << 30) + 4342);
INSERT_PAIR_TEST(Int32Int32Pair, 9, (1 << 29) + 378128932); INSERT_PAIR_TEST(Int32Int32Pair, 9, (1 << 29) + 378128932);
INSERT_PAIR_TEST(Int32Int64Pair, 10, (1LL << 60) + 78931732321); INSERT_PAIR_TEST(Int32Int64Pair, 10,
(GG_INT64_C(1) << 60) + GG_INT64_C(78931732321));
typedef std::pair<int64, short> Int64ShortPair; typedef std::pair<int64, short> Int64ShortPair;
typedef std::pair<int64, int> Int64IntPair; typedef std::pair<int64, int> Int64IntPair;
...@@ -58,7 +63,8 @@ TEST_F(HashPairTest, IntegerPairs) { ...@@ -58,7 +63,8 @@ TEST_F(HashPairTest, IntegerPairs) {
INSERT_PAIR_TEST(Int64ShortPair, 4, 6); INSERT_PAIR_TEST(Int64ShortPair, 4, 6);
INSERT_PAIR_TEST(Int64IntPair, 7, (1 << 30) + 4342); INSERT_PAIR_TEST(Int64IntPair, 7, (1 << 30) + 4342);
INSERT_PAIR_TEST(Int64Int32Pair, 9, (1 << 29) + 378128932); INSERT_PAIR_TEST(Int64Int32Pair, 9, (1 << 29) + 378128932);
INSERT_PAIR_TEST(Int64Int64Pair, 10, (1LL << 60) + 78931732321); INSERT_PAIR_TEST(Int64Int64Pair, 10,
(GG_INT64_C(1) << 60) + GG_INT64_C(78931732321));
} }
} // anonymous namespace } // anonymous namespace
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment