chromium/third_party/perfetto/src/trace_processor/rpc/query_result_serializer_unittest.cc


/*
 * Copyright (C) 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#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 {

// For ASSERT_THAT(ElementsAre(...))
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) {}

// Implements a minimal deserializer for QueryResultSerializer.
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) {}

}  // namespace
}  // namespace trace_processor
}  // namespace perfetto