chromium/third_party/perfetto/src/trace_redaction/proto_util_unittest.cc

/*
 * Copyright (C) 2024 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/protozero/scattered_heap_buffer.h"

#include "src/trace_redaction/proto_util.h"
#include "test/gtest_and_gmock.h"

#include "protos/perfetto/config/test_config.gen.h"
#include "protos/perfetto/config/test_config.pbzero.h"
#include "protos/perfetto/trace/trace_packet.gen.h"

namespace perfetto::trace_redaction {

namespace proto_util {

class ProtoUtilTest : public testing::Test {};

class ProtoUtilUint32Test : public ProtoUtilTest,
                            public testing::WithParamInterface<uint32_t> {};
class ProtoUtilUint64Test : public ProtoUtilTest,
                            public testing::WithParamInterface<uint64_t> {};
class ProtoUtilInt32Test : public ProtoUtilTest,
                           public testing::WithParamInterface<int32_t> {};
class ProtoUtilInt64Test : public ProtoUtilTest,
                           public testing::WithParamInterface<int64_t> {};
class ProtoUtilFixed32Test : public ProtoUtilTest,
                             public testing::WithParamInterface<uint32_t> {};
class ProtoUtilFixed64Test : public ProtoUtilTest,
                             public testing::WithParamInterface<uint64_t> {};
class ProtoUtilSfixed32Test : public ProtoUtilTest,
                              public testing::WithParamInterface<int32_t> {};
class ProtoUtilSfixed64Test : public ProtoUtilTest,
                              public testing::WithParamInterface<int64_t> {};
class ProtoUtilDoubleTest : public ProtoUtilTest,
                            public testing::WithParamInterface<double> {};
class ProtoUtilFloatTest : public ProtoUtilTest,
                           public testing::WithParamInterface<float> {};
class ProtoUtilSint32Test : public ProtoUtilTest,
                            public testing::WithParamInterface<int32_t> {};
class ProtoUtilSint64Test : public ProtoUtilTest,
                            public testing::WithParamInterface<int64_t> {};
class ProtoUtilStringTest : public ProtoUtilTest,
                            public testing::WithParamInterface<std::string> {};
class ProtoUtilBytesTest : public ProtoUtilTest,
                           public testing::WithParamInterface<std::string> {};

TEST_P(ProtoUtilUint32Test, FullDomain) {}

INSTANTIATE_TEST_SUITE_P();

TEST_P(ProtoUtilUint64Test, FullDomain) {}

INSTANTIATE_TEST_SUITE_P();

TEST_P(ProtoUtilInt32Test, FullDomain) {}

INSTANTIATE_TEST_SUITE_P();

TEST_P(ProtoUtilInt64Test, FullDomain) {}

INSTANTIATE_TEST_SUITE_P();

TEST_P(ProtoUtilFixed32Test, FullDomain) {}

INSTANTIATE_TEST_SUITE_P();

TEST_P(ProtoUtilSfixed32Test, FullDomain) {}

INSTANTIATE_TEST_SUITE_P();

TEST_P(ProtoUtilDoubleTest, FullDomain) {}

INSTANTIATE_TEST_SUITE_P();

TEST_P(ProtoUtilFloatTest, FullDomain) {}

INSTANTIATE_TEST_SUITE_P();

TEST_P(ProtoUtilSint64Test, FullDomain) {}

INSTANTIATE_TEST_SUITE_P();

TEST_P(ProtoUtilSint32Test, FullDomain) {}

INSTANTIATE_TEST_SUITE_P();

TEST_P(ProtoUtilStringTest, Various) {}

INSTANTIATE_TEST_SUITE_P();

TEST_P(ProtoUtilBytesTest, Various) {}

INSTANTIATE_TEST_SUITE_P();

}  // namespace proto_util

}  // namespace perfetto::trace_redaction