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

Unified Diff: base/pickle_unittest.cc

Issue 34413002: Pickle::Write* micro-optimizations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows Created 7 years, 2 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
« no previous file with comments | « 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 dd00e6a5d4db4657ecf4f2f3bc363aea4dc6db82..9dd009116ca0bcd52a863d9786aba5270a7a14ec 100644
--- a/base/pickle_unittest.cc
+++ b/base/pickle_unittest.cc
@@ -217,19 +217,19 @@ TEST(PickleTest, Resize) {
size_t cur_payload = payload_size_after_header;
// note: we assume 'unit' is a power of 2
- EXPECT_EQ(unit, pickle.capacity());
+ EXPECT_EQ(unit, pickle.capacity_after_header());
EXPECT_EQ(pickle.payload_size(), payload_size_after_header);
// fill out a full page (noting data header)
pickle.WriteData(data_ptr, static_cast<int>(unit - sizeof(uint32)));
cur_payload += unit;
- EXPECT_EQ(unit * 2, pickle.capacity());
+ EXPECT_EQ(unit * 2, pickle.capacity_after_header());
EXPECT_EQ(cur_payload, pickle.payload_size());
// one more byte should double the capacity
pickle.WriteData(data_ptr, 1);
cur_payload += 5;
- EXPECT_EQ(unit * 4, pickle.capacity());
+ EXPECT_EQ(unit * 4, pickle.capacity_after_header());
EXPECT_EQ(cur_payload, pickle.payload_size());
}
« no previous file with comments | « base/pickle.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698