trace_processor: add code for parsing a trace
This CL utilises the previously introduced ProtoDecoder class to parse a
Trace into its important components. It doesn't do anything with the
parsed data yet but it lays the skeleton for writing to TraceStorage in
a subsequent CL.
Bug: 80416541
Change-Id: Id0422968adea16a98ec46b583057e440cd5274cf
diff --git a/src/protozero/proto_decoder_unittest.cc b/src/protozero/proto_decoder_unittest.cc
index fff9dba..a3b5b69 100644
--- a/src/protozero/proto_decoder_unittest.cc
+++ b/src/protozero/proto_decoder_unittest.cc
@@ -49,9 +49,9 @@
ASSERT_EQ(field.id, 1);
ASSERT_EQ(field.type, proto_utils::FieldType::kFieldTypeLengthDelimited);
- ASSERT_EQ(field.length_value.length, sizeof(kTestString) - 1);
+ ASSERT_EQ(field.length_limited.length, sizeof(kTestString) - 1);
for (size_t i = 0; i < sizeof(kTestString) - 1; i++) {
- ASSERT_EQ(field.length_value.data[i], kTestString[i]);
+ ASSERT_EQ(field.length_limited.data[i], kTestString[i]);
}
}
@@ -93,7 +93,7 @@
ASSERT_EQ(exp.type, field.type);
if (field.type == kFieldTypeLengthDelimited) {
- ASSERT_EQ(exp.int_value, field.length_value.length);
+ ASSERT_EQ(exp.int_value, field.length_limited.length);
} else {
ASSERT_EQ(exp.int_value, field.int_value);
}