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

Unified Diff: base/id_map_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/id_map.h ('k') | base/ios/crb_protocol_observers.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/id_map_unittest.cc
diff --git a/base/id_map_unittest.cc b/base/id_map_unittest.cc
index 2cd63093805f558cc768ff5ddab72c84a6ae68e0..7a07a28db52f6bb749355cb383f44790c13fff1b 100644
--- a/base/id_map_unittest.cc
+++ b/base/id_map_unittest.cc
@@ -4,6 +4,8 @@
#include "base/id_map.h"
+#include <stdint.h>
+
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -28,12 +30,12 @@ TEST(IDMapTest, Basic) {
TestObject obj1;
TestObject obj2;
- int32 id1 = map.Add(&obj1);
+ int32_t id1 = map.Add(&obj1);
EXPECT_FALSE(map.IsEmpty());
EXPECT_EQ(1U, map.size());
EXPECT_EQ(&obj1, map.Lookup(id1));
- int32 id2 = map.Add(&obj2);
+ int32_t id2 = map.Add(&obj2);
EXPECT_FALSE(map.IsEmpty());
EXPECT_EQ(2U, map.size());
@@ -102,7 +104,7 @@ TEST(IDMapTest, IteratorRemainsValidWhenRemovingOtherElements) {
map.Add(&obj[i]);
// IDMap uses a hash_map, which has no predictable iteration order.
- int32 ids_in_iteration_order[kCount];
+ int32_t ids_in_iteration_order[kCount];
const TestObject* objs_in_iteration_order[kCount];
int counter = 0;
for (IDMap<TestObject>::const_iterator iter(&map);
@@ -212,7 +214,7 @@ TEST(IDMapTest, IteratorRemainsValidWhenClearing) {
map.Add(&obj[i]);
// IDMap uses a hash_map, which has no predictable iteration order.
- int32 ids_in_iteration_order[kCount];
+ int32_t ids_in_iteration_order[kCount];
const TestObject* objs_in_iteration_order[kCount];
int counter = 0;
for (IDMap<TestObject>::const_iterator iter(&map);
« no previous file with comments | « base/id_map.h ('k') | base/ios/crb_protocol_observers.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698