chromium/components/performance_manager/graph/node_inline_data_unittest.cc

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/performance_manager/graph/node_inline_data.h"

#include <string>

#include "base/test/gtest_util.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace performance_manager {

template <class T>
struct DataWithDefaultCtor : public NodeInlineData<DataWithDefaultCtor<T>> {};

template <class T>
struct DataWithExplicitCtor : public NodeInlineData<DataWithExplicitCtor<T>> {};

template <class T>
struct SparseDataWithDefaultCtor
    : public SparseNodeInlineData<SparseDataWithDefaultCtor<T>> {};

template <class T>
struct SparseDataWithExplicitCtor
    : public SparseNodeInlineData<SparseDataWithExplicitCtor<T>> {};

// Tests internal::IsSparseNodeInlineData.
static_assert;
static_assert;

template <class... Args>
class DummyTestSupportsNodeInlineData : public SupportsNodeInlineData<Args...> {};

TEST(NodeInlineDataTest, MustCreateStorage) {}

template <class... Args>
class TestSupportsNodeInlineData : public SupportsNodeInlineData<Args...> {};

const int kTestIntValue1 =;
const int kTestIntValue2 =;
const double kTestDoubleValue1 =;
const double kTestDoubleValue2 =;
const char* kTestStringValue1 =;
const char* kTestStringValue2 =;

TEST(NodeInlineDataDeathTest, NonSparseDefaultCtor) {}

TEST(NodeInlineDataDeathTest, NonSparseExplicitCtor) {}

TEST(NodeInlineDataDeathTest, SparseTypeWithDefaultCtor) {}

TEST(NodeInlineDataDeathTest, SparseTypeWithExplicitCtor) {}

TEST(NodeInlineDataTest, MixMultipleTypesSameStorage) {}

TEST(NodeInlineDataTest, MixMultipleTypesDifferentStorage) {}

}  // namespace performance_manager