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

Unified Diff: sync/engine/syncer_util_unittest.cc

Issue 1545553003: Switch to standard integer types in sync/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « sync/engine/syncer_util.cc ('k') | sync/engine/update_applicator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/syncer_util_unittest.cc
diff --git a/sync/engine/syncer_util_unittest.cc b/sync/engine/syncer_util_unittest.cc
index b4026d04f9e1eafa5a5d4327d4292902b368bc1b..5551d8212af13ad7a1f9b1c1c6edc5b08d43bcff 100644
--- a/sync/engine/syncer_util_unittest.cc
+++ b/sync/engine/syncer_util_unittest.cc
@@ -4,6 +4,8 @@
#include "sync/engine/syncer_util.h"
+#include <stdint.h>
+
#include "base/rand_util.h"
#include "sync/internal_api/public/base/unique_position.h"
#include "sync/internal_api/public/test/test_entry_factory.h"
@@ -62,7 +64,7 @@ class GetUpdatePositionTest : public ::testing::Test {
test_position.ToProto(update.mutable_unique_position());
}
- void InitInt64Position(int64 pos_value) {
+ void InitInt64Position(int64_t pos_value) {
update.set_position_in_parent(pos_value);
}
@@ -125,13 +127,13 @@ TEST_F(GetUpdatePositionTest, FromProto) {
std::string suffix = GetUniqueBookmarkTagFromUpdate(update);
- // The proto position is not set, so we should get one based on the int64.
+ // The proto position is not set, so we should get one based on the int64_t.
// It should not match the proto we defined in the test harness.
UniquePosition int64_pos = GetUpdatePosition(update, suffix);
EXPECT_FALSE(int64_pos.Equals(test_position));
// Move the test harness' position value into the update proto.
- // Expect that it takes precedence over the int64-based position.
+ // Expect that it takes precedence over the int64_t-based position.
InitProtoPosition();
UniquePosition pos = GetUpdatePosition(update, suffix);
EXPECT_TRUE(pos.Equals(test_position));
@@ -162,7 +164,7 @@ TEST_F(GetUpdatePositionTest, UpdateServerFieldsFromUpdateTest) {
InitSuffixIngredients(); // Initialize update with valid data.
std::string root_server_id = syncable::Id::GetRoot().GetServerId();
- int64 handle = entry_factory()->CreateUnappliedNewBookmarkItemWithParent(
+ int64_t handle = entry_factory()->CreateUnappliedNewBookmarkItemWithParent(
"I", DefaultBookmarkSpecifics(), root_server_id);
syncable::WriteTransaction trans(FROM_HERE, syncable::UNITTEST, directory());
@@ -185,7 +187,7 @@ TEST_F(GetUpdatePositionTest, UpdateServerFieldsFromInvalidUpdateTest) {
// Do not initialize data in update, update is invalid.
std::string root_server_id = syncable::Id::GetRoot().GetServerId();
- int64 handle = entry_factory()->CreateUnappliedNewBookmarkItemWithParent(
+ int64_t handle = entry_factory()->CreateUnappliedNewBookmarkItemWithParent(
"I", DefaultBookmarkSpecifics(), root_server_id);
syncable::WriteTransaction trans(FROM_HERE, syncable::UNITTEST, directory());
@@ -211,7 +213,7 @@ TEST_F(GetUpdatePositionTest, UpdateServerFieldsFromInvalidUniquePositionTest) {
invalid_update.set_allocated_unique_position(invalid_position);
std::string root_server_id = syncable::Id::GetRoot().GetServerId();
- int64 handle = entry_factory()->CreateUnappliedNewBookmarkItemWithParent(
+ int64_t handle = entry_factory()->CreateUnappliedNewBookmarkItemWithParent(
"I", DefaultBookmarkSpecifics(), root_server_id);
syncable::WriteTransaction trans(FROM_HERE, syncable::UNITTEST, directory());
« no previous file with comments | « sync/engine/syncer_util.cc ('k') | sync/engine/update_applicator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698