chromium/base/profiler/stack_copier_unittest.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/40284755): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif

#include "base/profiler/stack_copier.h"

#include <cstring>
#include <iterator>
#include <memory>
#include <numeric>

#include "base/profiler/register_context.h"
#include "base/profiler/stack_buffer.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace base {

namespace {

class CopyFunctions : public StackCopier {};

static constexpr size_t kTestStackBufferSize =;

TestStackBuffer;

}  // namespace

TEST(StackCopierTest, RewritePointerIfInOriginalStack_InStack) {}

TEST(StackCopierTest, RewritePointerIfInOriginalStack_NotInStack) {}

TEST(StackCopierTest, StackCopy) {}

TEST(StackCopierTest, StackCopy_NonAlignedStackPointerCopy) {}

// Checks that an unaligned within-stack pointer value at the start of the stack
// is not rewritten.
TEST(StackCopierTest, StackCopy_NonAlignedStackPointerUnalignedRewriteAtStart) {}

// Checks that an unaligned within-stack pointer after the start of the stack is
// not rewritten.
TEST(StackCopierTest,
     StackCopy_NonAlignedStackPointerUnalignedRewriteAfterStart) {}

TEST(StackCopierTest, StackCopy_NonAlignedStackPointerAlignedRewrite) {}

TEST(StackCopierTest, CloneStack) {}

}  // namespace base