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

Unified Diff: base/guid_unittest.cc

Issue 1538743002: Switch to standard integer types in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS roll too Created 5 years 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 | « base/guid_posix.cc ('k') | base/guid_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/guid_unittest.cc
diff --git a/base/guid_unittest.cc b/base/guid_unittest.cc
index 1c5d393c4d827717581cf3cb68626d6d95f69784..b6d976d8e0d3f7d85f921080d0b23fb0846f5794 100644
--- a/base/guid_unittest.cc
+++ b/base/guid_unittest.cc
@@ -4,9 +4,12 @@
#include "base/guid.h"
+#include <stdint.h>
+
#include <limits>
#include "base/strings/string_util.h"
+#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
@@ -26,13 +29,13 @@ bool IsGUIDv4(const std::string& guid) {
} // namespace
TEST(GUIDTest, GUIDGeneratesAllZeroes) {
- uint64 bytes[] = { 0, 0 };
+ uint64_t bytes[] = {0, 0};
std::string clientid = RandomDataToGUIDString(bytes);
EXPECT_EQ("00000000-0000-0000-0000-000000000000", clientid);
}
TEST(GUIDTest, GUIDGeneratesCorrectly) {
- uint64 bytes[] = { 0x0123456789ABCDEFULL, 0xFEDCBA9876543210ULL };
+ uint64_t bytes[] = {0x0123456789ABCDEFULL, 0xFEDCBA9876543210ULL};
std::string clientid = RandomDataToGUIDString(bytes);
EXPECT_EQ("01234567-89AB-CDEF-FEDC-BA9876543210", clientid);
}
« no previous file with comments | « base/guid_posix.cc ('k') | base/guid_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698