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

Unified Diff: components/tracing/core/proto_utils_unittest.cc

Issue 2271653004: Reland of tracing v2: Introduce TraceBufferWriter (https://codereview.chromium.org/2196663002) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix undefined behavior of move ctor that caused revert on Win Created 4 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
« no previous file with comments | « components/tracing/core/proto_utils.h ('k') | components/tracing/core/proto_zero_message.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/tracing/core/proto_utils_unittest.cc
diff --git a/components/tracing/core/proto_utils_unittest.cc b/components/tracing/core/proto_utils_unittest.cc
index 88505aa5f1cadf4a6cd5d994cdf95e80c86c719b..8800dfbe17d8e452f928c50790a975816ac02bbe 100644
--- a/components/tracing/core/proto_utils_unittest.cc
+++ b/components/tracing/core/proto_utils_unittest.cc
@@ -114,20 +114,20 @@ TEST(ProtoUtilsTest, Serialization) {
uint8_t buf[kMessageLengthFieldSize];
- WriteRedundantLength(0, buf);
+ WriteRedundantVarInt(0, buf);
EXPECT_EQ(0, memcmp("\x80\x80\x80\x00", buf, sizeof(buf)));
- WriteRedundantLength(1, buf);
+ WriteRedundantVarInt(1, buf);
EXPECT_EQ(0, memcmp("\x81\x80\x80\x00", buf, sizeof(buf)));
- WriteRedundantLength(0x80, buf);
+ WriteRedundantVarInt(0x80, buf);
EXPECT_EQ(0, memcmp("\x80\x81\x80\x00", buf, sizeof(buf)));
- WriteRedundantLength(0x332211, buf);
+ WriteRedundantVarInt(0x332211, buf);
EXPECT_EQ(0, memcmp("\x91\xC4\xCC\x01", buf, sizeof(buf)));
// Largest allowed length.
- WriteRedundantLength(0x0FFFFFFF, buf);
+ WriteRedundantVarInt(0x0FFFFFFF, buf);
EXPECT_EQ(0, memcmp("\xFF\xFF\xFF\x7F", buf, sizeof(buf)));
}
« no previous file with comments | « components/tracing/core/proto_utils.h ('k') | components/tracing/core/proto_zero_message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698