// Copyright 2019 the V8 project authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.#ifndef V8_UNITTESTS_HEAP_BITMAP_TEST_UTILS_H_#define V8_UNITTESTS_HEAP_BITMAP_TEST_UTILS_H_#include "testing/gtest/include/gtest/gtest.h"namespacev8{namespaceinternal{template<typenameT>classTestWithBitmap:public::testing::Test{public:TestWithBitmap():memory_(newuint8_t[Bitmap::kSize]){memset(memory_,0,Bitmap::kSize);}~TestWithBitmap()override{delete[]memory_;}T*bitmap(){returnreinterpret_cast<T*>(memory_);}uint8_t*raw_bitmap(){returnmemory_;}private:uint8_t*memory_;};usingBitmapTypes=::testing::Types<ConcurrentBitmap<AccessMode::NON_ATOMIC>,ConcurrentBitmap<AccessMode::ATOMIC>>;}// namespace internal}// namespace v8#endif // V8_UNITTESTS_HEAP_BITMAP_TEST_UTILS_H_