chromium/third_party/blink/renderer/platform/wtf/atomic_operations_test.cc

// Copyright 2019 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/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/renderer/platform/wtf/atomic_operations.h"

#include "testing/gtest/include/gtest/gtest.h"

namespace WTF {

class AtomicOperationsTest : public ::testing::Test {};

template <size_t buffer_size, size_t alignment, typename CopyMethod>
void TestCopyImpl(CopyMethod copy) {}

// Tests for AtomicReadMemcpy
template <size_t buffer_size, size_t alignment>
void TestAtomicReadMemcpy() {}

TEST_F(AtomicOperationsTest, AtomicReadMemcpy_UINT8T) {}
TEST_F(AtomicOperationsTest, AtomicReadMemcpy_UINT16T) {}
TEST_F(AtomicOperationsTest, AtomicReadMemcpy_UINT32T) {}
TEST_F(AtomicOperationsTest, AtomicReadMemcpy_UINT64T) {}

TEST_F(AtomicOperationsTest, AtomicReadMemcpy_17Bytes) {}
TEST_F(AtomicOperationsTest, AtomicReadMemcpy_34Bytes) {}
TEST_F(AtomicOperationsTest, AtomicReadMemcpy_68Bytes) {}
TEST_F(AtomicOperationsTest, AtomicReadMemcpy_127Bytes) {}

// Tests for AtomicWriteMemcpy
template <size_t buffer_size, size_t alignment>
void TestAtomicWriteMemcpy() {}

TEST_F(AtomicOperationsTest, AtomicWriteMemcpy_UINT8T) {}
TEST_F(AtomicOperationsTest, AtomicWriteMemcpy_UINT16T) {}
TEST_F(AtomicOperationsTest, AtomicWriteMemcpy_UINT32T) {}
TEST_F(AtomicOperationsTest, AtomicWriteMemcpy_UINT64T) {}

TEST_F(AtomicOperationsTest, AtomicWriteMemcpy_17Bytes) {}
TEST_F(AtomicOperationsTest, AtomicWriteMemcpy_34Bytes) {}
TEST_F(AtomicOperationsTest, AtomicWriteMemcpy_68Bytes) {}
TEST_F(AtomicOperationsTest, AtomicWriteMemcpy_127Bytes) {}

// Tests for AtomicMemzero
template <size_t buffer_size, size_t alignment>
void TestAtomicMemzero() {}

TEST_F(AtomicOperationsTest, AtomicMemzero_UINT8T) {}
TEST_F(AtomicOperationsTest, AtomicMemzero_UINT16T) {}
TEST_F(AtomicOperationsTest, AtomicMemzero_UINT32T) {}
TEST_F(AtomicOperationsTest, AtomicMemzero_UINT64T) {}

TEST_F(AtomicOperationsTest, AtomicMemzero_17Bytes) {}
TEST_F(AtomicOperationsTest, AtomicMemzero_34Bytes) {}
TEST_F(AtomicOperationsTest, AtomicMemzero_68Bytes) {}
TEST_F(AtomicOperationsTest, AtomicMemzero_127Bytes) {}

}  // namespace WTF