chromium/v8/test/unittests/objects/concurrent-string-unittest.cc

// Copyright 2022 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.

#include "src/api/api.h"
#include "src/base/platform/semaphore.h"
#include "src/handles/handles-inl.h"
#include "src/handles/local-handles-inl.h"
#include "src/handles/persistent-handles.h"
#include "src/heap/heap.h"
#include "src/heap/local-heap-inl.h"
#include "src/heap/local-heap.h"
#include "src/heap/parked-scope.h"
#include "test/unittests/test-utils.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace v8 {

using ConcurrentStringTest = TestWithContext;

namespace internal {

namespace {

#define DOUBLE_VALUE
#define STRING_VALUE
#define ARRAY_VALUE

// Adapted from cctest/test-api.cc, and
// test/cctest/heap/test-external-string-tracker.cc.
class TestOneByteResource : public v8::String::ExternalOneByteStringResource {};

// Adapted from cctest/test-api.cc.
class TestTwoByteResource : public v8::String::ExternalStringResource {};

class ConcurrentStringThread final : public v8::base::Thread {};

// Inspect a one byte string, while the main thread externalizes it.
TEST_F(ConcurrentStringTest, InspectOneByteExternalizing) {}

// Inspect a two byte string, while the main thread externalizes it.
TEST_F(ConcurrentStringTest, InspectTwoByteExternalizing) {}

// Inspect a one byte string, while the main thread externalizes it. Same as
// InspectOneByteExternalizing, but using thin strings.
TEST_F(ConcurrentStringTest, InspectOneByteExternalizing_ThinString) {}

// Inspect a two byte string, while the main thread externalizes it. Same as
// InspectTwoByteExternalizing, but using thin strings.
TEST_F(ConcurrentStringTest, InspectTwoByteExternalizing_ThinString) {}

}  // anonymous namespace

}  // namespace internal
}  // namespace v8