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

Unified Diff: base/pickle_unittest.cc

Issue 19642005: Make TracedValue lower overhead. Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 4 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
« base/debug/trace_event_value.cc ('K') | « base/pickle.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« base/debug/trace_event_value.cc ('K') | « base/pickle.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698