#include "base/memory/shared_memory_mapping.h"
#include <stdint.h>
#include <atomic>
#include <limits>
#include "base/containers/span.h"
#include "base/memory/read_only_shared_memory_region.h"
#include "base/memory/writable_shared_memory_region.h"
#include "base/ranges/algorithm.h"
#include "build/build_config.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
class SharedMemoryMappingTest : public ::testing::Test { … };
TEST_F(SharedMemoryMappingTest, Invalid) { … }
TEST_F(SharedMemoryMappingTest, Scalar) { … }
TEST_F(SharedMemoryMappingTest, SpanWithAutoDeducedElementCount) { … }
TEST_F(SharedMemoryMappingTest, SpanWithExplicitElementCount) { … }
TEST_F(SharedMemoryMappingTest, SpanWithZeroElementCount) { … }
TEST_F(SharedMemoryMappingTest, TooBigScalar) { … }
TEST_F(SharedMemoryMappingTest, TooBigSpanWithAutoDeducedElementCount) { … }
TEST_F(SharedMemoryMappingTest, TooBigSpanWithExplicitElementCount) { … }
TEST_F(SharedMemoryMappingTest, Atomic) { … }
TEST_F(SharedMemoryMappingTest, TooBigAtomic) { … }
#if !BUILDFLAG(IS_IOS)
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
#define MAYBE_TotalMappedSizeLimit …
#else
#define MAYBE_TotalMappedSizeLimit …
#endif
TEST_F(SharedMemoryMappingTest, MAYBE_TotalMappedSizeLimit) { … }
#endif
}