Index: base/pickle_unittest.cc |
diff --git a/base/pickle_unittest.cc b/base/pickle_unittest.cc |
index cc384c70617ae354ae31b8bc7a52c7c4cf9fce6e..f7c734de30eddff5e89860dcc0656a3570ea0e77 100644 |
--- a/base/pickle_unittest.cc |
+++ b/base/pickle_unittest.cc |
@@ -20,6 +20,7 @@ const int testdatalen = arraysize(testdata) - 1; |
const bool testbool1 = false; |
const bool testbool2 = true; |
const uint16 testuint16 = 32123; |
+const uintptr_t testuintptr_t = 42; |
const float testfloat = 3.1415926935f; |
// checks that the result |
@@ -48,6 +49,10 @@ void VerifyResult(const Pickle& pickle) { |
EXPECT_TRUE(pickle.ReadUInt16(&iter, &outuint16)); |
EXPECT_EQ(testuint16, outuint16); |
+ uintptr_t outuintptr_t; |
+ EXPECT_TRUE(pickle.ReadUIntPtr(&iter, &outuintptr_t)); |
+ EXPECT_EQ(testuintptr_t, outuintptr_t); |
+ |
float outfloat; |
EXPECT_TRUE(pickle.ReadFloat(&iter, &outfloat)); |
EXPECT_EQ(testfloat, outfloat); |
@@ -77,6 +82,7 @@ TEST(PickleTest, EncodeDecode) { |
EXPECT_TRUE(pickle.WriteBool(testbool1)); |
EXPECT_TRUE(pickle.WriteBool(testbool2)); |
EXPECT_TRUE(pickle.WriteUInt16(testuint16)); |
+ EXPECT_TRUE(pickle.WriteUIntPtr(testuintptr_t)); |
EXPECT_TRUE(pickle.WriteFloat(testfloat)); |
EXPECT_TRUE(pickle.WriteData(testdata, testdatalen)); |