chromium/chrome/browser/ui/tabs/supports_handles_unittest.cc

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

#include "chrome/browser/ui/tabs/supports_handles.h"

#include <concepts>
#include <cstdint>
#include <memory>

#include "testing/gtest/include/gtest/gtest-death-test.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace {
class DefaultTestClass : public SupportsHandles<DefaultTestClass> {};
template <std::integral V>
class TestClass : public SupportsHandles<TestClass<V>, V> {};
}  // namespace

class SupportsHandlesTest : public testing::Test {};

TEST_F(SupportsHandlesTest, NullHandle) {}

TEST_F(SupportsHandlesTest, ValidHandle) {}

TEST_F(SupportsHandlesTest, HandleBecomesInvalid) {}

// Verifies that ubsan CI builds can handle default template parameter.
TEST_F(SupportsHandlesTest, DefaultHandleBecomesInvalid) {}

TEST_F(SupportsHandlesTest, IncrementsValues) {}

TEST_F(SupportsHandlesTest, FailsOnRolloverUnsigned) {}

TEST_F(SupportsHandlesTest, FailsOnRolloverSigned) {}