#include "perfetto/ext/trace_processor/rpc/query_result_serializer.h"
#include <deque>
#include <ostream>
#include <random>
#include <string>
#include <vector>
#include "perfetto/ext/base/string_utils.h"
#include "perfetto/trace_processor/basic_types.h"
#include "perfetto/trace_processor/trace_processor.h"
#include "test/gtest_and_gmock.h"
#include "protos/perfetto/trace_processor/trace_processor.pbzero.h"
namespace perfetto {
namespace trace_processor {
inline bool operator==(const SqlValue& a, const SqlValue& b) { … }
inline std::ostream& operator<<(std::ostream& stream, const SqlValue& v) { … }
namespace {
ElementsAre;
BatchProto;
ResultProto;
void RunQueryChecked(TraceProcessor* tp, const std::string& query) { … }
class TestDeserializer { … };
void TestDeserializer::SerializeAndDeserialize(
QueryResultSerializer* serializer) { … }
void TestDeserializer::DeserializeBuffer(const uint8_t* start, size_t size) { … }
TEST(QueryResultSerializerTest, ShortBatch) { … }
TEST(QueryResultSerializerTest, LongBatch) { … }
TEST(QueryResultSerializerTest, BatchSaturatingBinaryPayload) { … }
TEST(QueryResultSerializerTest, BatchSaturatingNumCells) { … }
TEST(QueryResultSerializerTest, LargeStringAndBlobs) { … }
TEST(QueryResultSerializerTest, RandomSizes) { … }
TEST(QueryResultSerializerTest, ErrorBeforeStartingQuery) { … }
TEST(QueryResultSerializerTest, ErrorAfterSomeResults) { … }
TEST(QueryResultSerializerTest, NoResultQuery) { … }
}
}
}