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

Unified Diff: net/disk_cache/simple/simple_util_unittest.cc

Issue 1160203003: net: Remove the remaining use of GG_(U)INTn_C macros. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stdint.h Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/simple/simple_index_file.h ('k') | net/disk_cache/simple/simple_version_upgrade_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_util_unittest.cc
diff --git a/net/disk_cache/simple/simple_util_unittest.cc b/net/disk_cache/simple/simple_util_unittest.cc
index ea039fc9ee6cd20332fcc1736a5decbfda671b41..fbda55ca8a76e9720f1245ddc0631f73de6b4f83 100644
--- a/net/disk_cache/simple/simple_util_unittest.cc
+++ b/net/disk_cache/simple/simple_util_unittest.cc
@@ -2,8 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stdint.h>
+
#include "base/logging.h"
-#include "base/port.h"
#include "net/disk_cache/simple/simple_util.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -18,46 +19,46 @@ class SimpleUtilTest : public testing::Test {};
TEST_F(SimpleUtilTest, ConvertEntryHashKeyToHexString) {
EXPECT_EQ("0000000005f5e0ff",
- ConvertEntryHashKeyToHexString(GG_UINT64_C(99999999)));
+ ConvertEntryHashKeyToHexString(UINT64_C(99999999)));
EXPECT_EQ("7fffffffffffffff",
- ConvertEntryHashKeyToHexString(GG_UINT64_C(9223372036854775807)));
+ ConvertEntryHashKeyToHexString(UINT64_C(9223372036854775807)));
EXPECT_EQ("8000000000000000",
- ConvertEntryHashKeyToHexString(GG_UINT64_C(9223372036854775808)));
+ ConvertEntryHashKeyToHexString(UINT64_C(9223372036854775808)));
EXPECT_EQ("ffffffffffffffff",
- ConvertEntryHashKeyToHexString(GG_UINT64_C(18446744073709551615)));
+ ConvertEntryHashKeyToHexString(UINT64_C(18446744073709551615)));
}
TEST_F(SimpleUtilTest, GetEntryHashKey) {
EXPECT_EQ("7ac408c1dff9c84b",
GetEntryHashKeyAsHexString("http://www.amazon.com/"));
- EXPECT_EQ(GG_UINT64_C(0x7ac408c1dff9c84b),
+ EXPECT_EQ(UINT64_C(0x7ac408c1dff9c84b),
GetEntryHashKey("http://www.amazon.com/"));
EXPECT_EQ("9fe947998c2ccf47",
GetEntryHashKeyAsHexString("www.amazon.com"));
- EXPECT_EQ(GG_UINT64_C(0x9fe947998c2ccf47), GetEntryHashKey("www.amazon.com"));
+ EXPECT_EQ(UINT64_C(0x9fe947998c2ccf47), GetEntryHashKey("www.amazon.com"));
EXPECT_EQ("0d4b6b5eeea339da", GetEntryHashKeyAsHexString(""));
- EXPECT_EQ(GG_UINT64_C(0x0d4b6b5eeea339da), GetEntryHashKey(""));
+ EXPECT_EQ(UINT64_C(0x0d4b6b5eeea339da), GetEntryHashKey(""));
EXPECT_EQ("a68ac2ecc87dfd04", GetEntryHashKeyAsHexString("http://www.domain.com/uoQ76Kb2QL5hzaVOSAKWeX0W9LfDLqphmRXpsfHN8tgF5lCsfTxlOVWY8vFwzhsRzoNYKhUIOTc5TnUlT0vpdQflPyk2nh7vurXOj60cDnkG3nsrXMhFCsPjhcZAic2jKpF9F9TYRYQwJo81IMi6gY01RK3ZcNl8WGfqcvoZ702UIdetvR7kiaqo1czwSJCMjRFdG6EgMzgXrwE8DYMz4fWqoa1F1c1qwTCBk3yOcmGTbxsPSJK5QRyNea9IFLrBTjfE7ZlN2vZiI7adcDYJef.htm"));
- EXPECT_EQ(GG_UINT64_C(0xa68ac2ecc87dfd04), GetEntryHashKey("http://www.domain.com/uoQ76Kb2QL5hzaVOSAKWeX0W9LfDLqphmRXpsfHN8tgF5lCsfTxlOVWY8vFwzhsRzoNYKhUIOTc5TnUlT0vpdQflPyk2nh7vurXOj60cDnkG3nsrXMhFCsPjhcZAic2jKpF9F9TYRYQwJo81IMi6gY01RK3ZcNl8WGfqcvoZ702UIdetvR7kiaqo1czwSJCMjRFdG6EgMzgXrwE8DYMz4fWqoa1F1c1qwTCBk3yOcmGTbxsPSJK5QRyNea9IFLrBTjfE7ZlN2vZiI7adcDYJef.htm"));
+ EXPECT_EQ(UINT64_C(0xa68ac2ecc87dfd04), GetEntryHashKey("http://www.domain.com/uoQ76Kb2QL5hzaVOSAKWeX0W9LfDLqphmRXpsfHN8tgF5lCsfTxlOVWY8vFwzhsRzoNYKhUIOTc5TnUlT0vpdQflPyk2nh7vurXOj60cDnkG3nsrXMhFCsPjhcZAic2jKpF9F9TYRYQwJo81IMi6gY01RK3ZcNl8WGfqcvoZ702UIdetvR7kiaqo1czwSJCMjRFdG6EgMzgXrwE8DYMz4fWqoa1F1c1qwTCBk3yOcmGTbxsPSJK5QRyNea9IFLrBTjfE7ZlN2vZiI7adcDYJef.htm"));
}
TEST_F(SimpleUtilTest, GetEntryHashKeyFromHexString) {
uint64 hash_key = 0;
EXPECT_TRUE(GetEntryHashKeyFromHexString("0000000005f5e0ff", &hash_key));
- EXPECT_EQ(GG_UINT64_C(99999999), hash_key);
+ EXPECT_EQ(UINT64_C(99999999), hash_key);
EXPECT_TRUE(GetEntryHashKeyFromHexString("7ffffffffffffffF", &hash_key));
- EXPECT_EQ(GG_UINT64_C(9223372036854775807), hash_key);
+ EXPECT_EQ(UINT64_C(9223372036854775807), hash_key);
EXPECT_TRUE(GetEntryHashKeyFromHexString("8000000000000000", &hash_key));
- EXPECT_EQ(GG_UINT64_C(9223372036854775808), hash_key);
+ EXPECT_EQ(UINT64_C(9223372036854775808), hash_key);
EXPECT_TRUE(GetEntryHashKeyFromHexString("FFFFFFFFFFFFFFFF", &hash_key));
- EXPECT_EQ(GG_UINT64_C(18446744073709551615), hash_key);
+ EXPECT_EQ(UINT64_C(18446744073709551615), hash_key);
// Wrong hash string size.
EXPECT_FALSE(GetEntryHashKeyFromHexString("FFFFFFFFFFFFFFF", &hash_key));
« no previous file with comments | « net/disk_cache/simple/simple_index_file.h ('k') | net/disk_cache/simple/simple_version_upgrade_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698