chromium/components/viz/common/resources/resource_sizes_unittest.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include <stddef.h>

#include "components/viz/common/resources/resource_sizes.h"
#include "components/viz/common/resources/shared_image_format.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace viz {
namespace {

struct TestFormat {};

// Modify this constant as per TestFormat variables defined in following tests.
const int kTestFormats =;

class ResourceUtilTest : public testing::Test {};

TEST_F(ResourceUtilTest, WidthInBytes) {}

TEST_F(ResourceUtilTest, SizeInBytes) {}

TEST_F(ResourceUtilTest, SizeInBytesOverflow) {}

TEST_F(ResourceUtilTest, WidthOverflowDoesNotCrash) {}

// Checks that we do not incorrectly indicate that a size has overflowed when
// only the size in bits overflows, but not the size in bytes.
TEST_F(ResourceUtilTest, SizeInBitsOverflowBytesOk) {}

// Checks that we correctly identify overflow in cases caused by rounding.
TEST_F(ResourceUtilTest, RoundingOverflows) {}

}  // namespace
}  // namespace viz