Commit a9a44a31 authored by jameslahm's avatar jameslahm Committed by V8 LUCI CQ

[test] Move cctest/test-threads to unittests/execution/

... threads-unittest.

Bug: v8:12781
Change-Id: I1294d0bf9f47c158532a489657bc1e5349afce79
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3682882Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#80881}
parent daee783c
......@@ -230,7 +230,6 @@ v8_source_set("cctest_sources") {
"test-swiss-name-dictionary.cc",
"test-temporal-parser.cc",
"test-thread-termination.cc",
"test-threads.cc",
"test-trace-event.cc",
"test-transitions.cc",
"test-transitions.h",
......
......@@ -333,6 +333,7 @@ v8_source_set("unittests_sources") {
"diagnostics/eh-frame-writer-unittest.cc",
"diagnostics/gdb-jit-unittest.cc",
"execution/microtask-queue-unittest.cc",
"execution/threads-unittest.cc",
"gay-fixed.cc",
"gay-fixed.h",
"gay-precision.cc",
......
......@@ -25,13 +25,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "test/cctest/cctest.h"
#include "src/execution/thread-id.h"
#include "test/unittests/test-utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace v8 {
namespace internal {
using ThreadsTest = TestWithIsolate;
// {ThreadId} must be trivially copyable to be stored in {std::atomic}.
ASSERT_TRIVIALLY_COPYABLE(i::ThreadId);
using AtomicThreadId = std::atomic<i::ThreadId>;
......@@ -66,7 +68,7 @@ class ThreadIdValidationThread : public base::Thread {
base::Semaphore* const semaphore_;
};
TEST(ThreadIdValidation) {
TEST_F(ThreadsTest, ThreadIdValidation) {
constexpr int kNThreads = 100;
std::unique_ptr<ThreadIdValidationThread> threads[kNThreads];
AtomicThreadId refs[kNThreads];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment