#include "src/trace_processor/util/protozero_to_text.h"
#include "perfetto/ext/base/string_utils.h"
#include "perfetto/protozero/scattered_heap_buffer.h"
#include "src/protozero/test/example_proto/test_messages.pbzero.h"
#include "src/trace_processor/importers/proto/track_event.descriptor.h"
#include "src/trace_processor/test_messages.descriptor.h"
#include "src/trace_processor/util/descriptors.h"
#include "test/gtest_and_gmock.h"
#include "protos/perfetto/trace/track_event/chrome_compositor_scheduler_state.pbzero.h"
#include "protos/perfetto/trace/track_event/track_event.pbzero.h"
namespace perfetto {
namespace trace_processor {
namespace protozero_to_text {
namespace {
constexpr size_t kChunkSize = …;
using ::protozero::test::protos::pbzero::EveryField;
using ::protozero::test::protos::pbzero::PackedRepeatedFields;
_;
ElementsAre;
Eq;
StartsWith;
TEST(ProtozeroToTextTest, TrackEventBasic) { … }
TEST(ProtozeroToTextTest, TrackEventNestedMsg) { … }
TEST(ProtozeroToTextTest, TrackEventEnumNames) { … }
TEST(ProtozeroToTextTest, CustomDescriptorPoolBasic) { … }
TEST(ProtozeroToTextTest, CustomDescriptorPoolNestedMsg) { … }
TEST(ProtozeroToTextTest, ProtozeroEnumToText) { … }
class ProtozeroToTextTestMessageTest : public testing::Test { … };
TEST_F(ProtozeroToTextTestMessageTest, FieldVarIntInt32) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldVarIntSint32) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldVarIntUint32) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldVarIntInt64) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldVarIntSint64) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldVarIntBool) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldVarIntSmallEnum) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldVarIntSignedEnum) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldVarIntBigEnum) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldVarIntEnumUnknown) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldVarIntUnknown) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldVarIntMismatch) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldVarIntForPacked) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldFixed32Signed) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldFixed32Unsigned) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldFixed32Float) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldFixed32Unknown) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldFixed32Mismatch) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldFixed64Signed) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldFixed64Unsigned) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldFixed64Double) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldFixed64Unknown) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldFixed64Mismatch) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedString) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedBytes) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedUnknown) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedMismatch) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedPackedForNonPacked) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedPackedVarIntInt32) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedPackedVarIntInt64) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedPackedVarIntUint32) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedPackedVarIntUint64) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedPackedFixed32Uint32) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedPackedFixed32Int32) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedPackedFixed32Float) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedPackedFixed64Uint64) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedPackedFixed64Int64) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedPackedFixed64Double) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedPackedSmallEnum) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedPackedSignedEnum) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedPackedBigEnum) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedPackedFixedErrShort) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedPackedFixedGarbage) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedPackedVarIntShort) { … }
TEST_F(ProtozeroToTextTestMessageTest, FieldLengthLimitedPackedVarIntGarbage) { … }
TEST_F(ProtozeroToTextTestMessageTest, ExtraBytes) { … }
TEST_F(ProtozeroToTextTestMessageTest, NonExistingType) { … }
}
}
}
}