Commit 24a51e1e authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

Move unittest files

R=sigurds@chromium.org

Bug: v8:9247
Change-Id: I25743f048e3e6cd22a18e003e77c8b78f147b630
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1630680Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61836}
parent dbf02624
...@@ -45,7 +45,6 @@ v8_source_set("unittests_sources") { ...@@ -45,7 +45,6 @@ v8_source_set("unittests_sources") {
"../../test/common/wasm/wasm-macro-gen.h", "../../test/common/wasm/wasm-macro-gen.h",
"../../testing/gmock-support.h", "../../testing/gmock-support.h",
"../../testing/gtest-support.h", "../../testing/gtest-support.h",
"allocation-unittest.cc",
"api/access-check-unittest.cc", "api/access-check-unittest.cc",
"api/exception-unittest.cc", "api/exception-unittest.cc",
"api/interceptor-unittest.cc", "api/interceptor-unittest.cc",
...@@ -54,7 +53,6 @@ v8_source_set("unittests_sources") { ...@@ -54,7 +53,6 @@ v8_source_set("unittests_sources") {
"api/v8-object-unittest.cc", "api/v8-object-unittest.cc",
"asmjs/asm-scanner-unittest.cc", "asmjs/asm-scanner-unittest.cc",
"asmjs/asm-types-unittest.cc", "asmjs/asm-types-unittest.cc",
"background-compile-task-unittest.cc",
"base/address-region-unittest.cc", "base/address-region-unittest.cc",
"base/atomic-utils-unittest.cc", "base/atomic-utils-unittest.cc",
"base/bits-unittest.cc", "base/bits-unittest.cc",
...@@ -78,11 +76,10 @@ v8_source_set("unittests_sources") { ...@@ -78,11 +76,10 @@ v8_source_set("unittests_sources") {
"base/template-utils-unittest.cc", "base/template-utils-unittest.cc",
"base/threaded-list-unittest.cc", "base/threaded-list-unittest.cc",
"base/utils/random-number-generator-unittest.cc", "base/utils/random-number-generator-unittest.cc",
"bigint-unittest.cc", "codegen/code-stub-assembler-unittest.cc",
"cancelable-tasks-unittest.cc", "codegen/code-stub-assembler-unittest.h",
"char-predicates-unittest.cc", "codegen/register-configuration-unittest.cc",
"code-stub-assembler-unittest.cc", "codegen/source-position-table-unittest.cc",
"code-stub-assembler-unittest.h",
"compiler-dispatcher/compiler-dispatcher-unittest.cc", "compiler-dispatcher/compiler-dispatcher-unittest.cc",
"compiler-dispatcher/optimizing-compile-dispatcher-unittest.cc", "compiler-dispatcher/optimizing-compile-dispatcher-unittest.cc",
"compiler/backend/instruction-selector-unittest.cc", "compiler/backend/instruction-selector-unittest.cc",
...@@ -145,12 +142,10 @@ v8_source_set("unittests_sources") { ...@@ -145,12 +142,10 @@ v8_source_set("unittests_sources") {
"compiler/typer-unittest.cc", "compiler/typer-unittest.cc",
"compiler/value-numbering-reducer-unittest.cc", "compiler/value-numbering-reducer-unittest.cc",
"compiler/zone-stats-unittest.cc", "compiler/zone-stats-unittest.cc",
"conversions-unittest.cc", "date/date-cache-unittest.cc",
"counters-unittest.cc", "diagnostics/eh-frame-iterator-unittest.cc",
"date-cache-unittest.cc", "diagnostics/eh-frame-writer-unittest.cc",
"detachable-vector-unittest.cc", "execution/microtask-queue-unittest.cc",
"eh-frame-iterator-unittest.cc",
"eh-frame-writer-unittest.cc",
"heap/barrier-unittest.cc", "heap/barrier-unittest.cc",
"heap/bitmap-test-utils.h", "heap/bitmap-test-utils.h",
"heap/bitmap-unittest.cc", "heap/bitmap-unittest.cc",
...@@ -188,16 +183,20 @@ v8_source_set("unittests_sources") { ...@@ -188,16 +183,20 @@ v8_source_set("unittests_sources") {
"libplatform/default-worker-threads-task-runner-unittest.cc", "libplatform/default-worker-threads-task-runner-unittest.cc",
"libplatform/task-queue-unittest.cc", "libplatform/task-queue-unittest.cc",
"libplatform/worker-thread-unittest.cc", "libplatform/worker-thread-unittest.cc",
"locked-queue-unittest.cc", "logging/counters-unittest.cc",
"microtask-queue-unittest.cc", "numbers/bigint-unittest.cc",
"object-unittest.cc", "numbers/conversions-unittest.cc",
"objects/object-unittest.cc",
"objects/value-serializer-unittest.cc",
"parser/ast-value-unittest.cc", "parser/ast-value-unittest.cc",
"parser/preparser-unittest.cc", "parser/preparser-unittest.cc",
"register-configuration-unittest.cc", "profiler/strings-storage-unittest.cc",
"regress/regress-crbug-938251-unittest.cc", "regress/regress-crbug-938251-unittest.cc",
"run-all-unittests.cc", "run-all-unittests.cc",
"source-position-table-unittest.cc", "strings/char-predicates-unittest.cc",
"strings-storage-unittest.cc", "strings/unicode-unittest.cc",
"tasks/background-compile-task-unittest.cc",
"tasks/cancelable-tasks-unittest.cc",
"test-helpers.cc", "test-helpers.cc",
"test-helpers.h", "test-helpers.h",
"test-utils.cc", "test-utils.cc",
...@@ -208,9 +207,10 @@ v8_source_set("unittests_sources") { ...@@ -208,9 +207,10 @@ v8_source_set("unittests_sources") {
"torque/ls-server-data-unittest.cc", "torque/ls-server-data-unittest.cc",
"torque/torque-unittest.cc", "torque/torque-unittest.cc",
"torque/torque-utils-unittest.cc", "torque/torque-utils-unittest.cc",
"unicode-unittest.cc", "utils/allocation-unittest.cc",
"utils-unittest.cc", "utils/detachable-vector-unittest.cc",
"value-serializer-unittest.cc", "utils/locked-queue-unittest.cc",
"utils/utils-unittest.cc",
"wasm/control-transfer-unittest.cc", "wasm/control-transfer-unittest.cc",
"wasm/decoder-unittest.cc", "wasm/decoder-unittest.cc",
"wasm/function-body-decoder-unittest.cc", "wasm/function-body-decoder-unittest.cc",
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "test/unittests/code-stub-assembler-unittest.h" #include "test/unittests/codegen/code-stub-assembler-unittest.h"
#include "src/codegen/code-factory.h" #include "src/codegen/code-factory.h"
#include "src/codegen/interface-descriptors.h" #include "src/codegen/interface-descriptors.h"
......
...@@ -30,7 +30,6 @@ class MockHistogram : public Histogram { ...@@ -30,7 +30,6 @@ class MockHistogram : public Histogram {
std::vector<int> samples_; std::vector<int> samples_;
}; };
class AggregatedMemoryHistogramTest : public ::testing::Test { class AggregatedMemoryHistogramTest : public ::testing::Test {
public: public:
AggregatedMemoryHistogramTest() : aggregated_(&mock_) {} AggregatedMemoryHistogramTest() : aggregated_(&mock_) {}
...@@ -182,7 +181,6 @@ class SnapshotNativeCounterTest : public TestWithNativeContextAndCounters { ...@@ -182,7 +181,6 @@ class SnapshotNativeCounterTest : public TestWithNativeContextAndCounters {
} // namespace } // namespace
TEST_F(AggregatedMemoryHistogramTest, OneSample1) { TEST_F(AggregatedMemoryHistogramTest, OneSample1) {
FLAG_histogram_interval = 10; FLAG_histogram_interval = 10;
AddSample(10, 1000); AddSample(10, 1000);
...@@ -191,7 +189,6 @@ TEST_F(AggregatedMemoryHistogramTest, OneSample1) { ...@@ -191,7 +189,6 @@ TEST_F(AggregatedMemoryHistogramTest, OneSample1) {
EXPECT_EQ(1000, (*samples())[0]); EXPECT_EQ(1000, (*samples())[0]);
} }
TEST_F(AggregatedMemoryHistogramTest, OneSample2) { TEST_F(AggregatedMemoryHistogramTest, OneSample2) {
FLAG_histogram_interval = 10; FLAG_histogram_interval = 10;
AddSample(10, 500); AddSample(10, 500);
...@@ -200,7 +197,6 @@ TEST_F(AggregatedMemoryHistogramTest, OneSample2) { ...@@ -200,7 +197,6 @@ TEST_F(AggregatedMemoryHistogramTest, OneSample2) {
EXPECT_EQ(750, (*samples())[0]); EXPECT_EQ(750, (*samples())[0]);
} }
TEST_F(AggregatedMemoryHistogramTest, OneSample3) { TEST_F(AggregatedMemoryHistogramTest, OneSample3) {
FLAG_histogram_interval = 10; FLAG_histogram_interval = 10;
AddSample(10, 500); AddSample(10, 500);
...@@ -211,7 +207,6 @@ TEST_F(AggregatedMemoryHistogramTest, OneSample3) { ...@@ -211,7 +207,6 @@ TEST_F(AggregatedMemoryHistogramTest, OneSample3) {
EXPECT_EQ(750, (*samples())[0]); EXPECT_EQ(750, (*samples())[0]);
} }
TEST_F(AggregatedMemoryHistogramTest, OneSample4) { TEST_F(AggregatedMemoryHistogramTest, OneSample4) {
FLAG_histogram_interval = 10; FLAG_histogram_interval = 10;
AddSample(10, 500); AddSample(10, 500);
...@@ -221,7 +216,6 @@ TEST_F(AggregatedMemoryHistogramTest, OneSample4) { ...@@ -221,7 +216,6 @@ TEST_F(AggregatedMemoryHistogramTest, OneSample4) {
EXPECT_EQ(750, (*samples())[0]); EXPECT_EQ(750, (*samples())[0]);
} }
TEST_F(AggregatedMemoryHistogramTest, TwoSamples1) { TEST_F(AggregatedMemoryHistogramTest, TwoSamples1) {
FLAG_histogram_interval = 10; FLAG_histogram_interval = 10;
AddSample(10, 1000); AddSample(10, 1000);
...@@ -231,7 +225,6 @@ TEST_F(AggregatedMemoryHistogramTest, TwoSamples1) { ...@@ -231,7 +225,6 @@ TEST_F(AggregatedMemoryHistogramTest, TwoSamples1) {
EXPECT_EQ(1000, (*samples())[1]); EXPECT_EQ(1000, (*samples())[1]);
} }
TEST_F(AggregatedMemoryHistogramTest, TwoSamples2) { TEST_F(AggregatedMemoryHistogramTest, TwoSamples2) {
FLAG_histogram_interval = 10; FLAG_histogram_interval = 10;
AddSample(10, 1000); AddSample(10, 1000);
...@@ -242,7 +235,6 @@ TEST_F(AggregatedMemoryHistogramTest, TwoSamples2) { ...@@ -242,7 +235,6 @@ TEST_F(AggregatedMemoryHistogramTest, TwoSamples2) {
EXPECT_EQ(1000, (*samples())[1]); EXPECT_EQ(1000, (*samples())[1]);
} }
TEST_F(AggregatedMemoryHistogramTest, TwoSamples3) { TEST_F(AggregatedMemoryHistogramTest, TwoSamples3) {
FLAG_histogram_interval = 10; FLAG_histogram_interval = 10;
AddSample(10, 1000); AddSample(10, 1000);
...@@ -254,7 +246,6 @@ TEST_F(AggregatedMemoryHistogramTest, TwoSamples3) { ...@@ -254,7 +246,6 @@ TEST_F(AggregatedMemoryHistogramTest, TwoSamples3) {
EXPECT_EQ(500, (*samples())[1]); EXPECT_EQ(500, (*samples())[1]);
} }
TEST_F(AggregatedMemoryHistogramTest, TwoSamples4) { TEST_F(AggregatedMemoryHistogramTest, TwoSamples4) {
FLAG_histogram_interval = 10; FLAG_histogram_interval = 10;
AddSample(10, 1000); AddSample(10, 1000);
...@@ -264,7 +255,6 @@ TEST_F(AggregatedMemoryHistogramTest, TwoSamples4) { ...@@ -264,7 +255,6 @@ TEST_F(AggregatedMemoryHistogramTest, TwoSamples4) {
EXPECT_EQ(250, (*samples())[1]); EXPECT_EQ(250, (*samples())[1]);
} }
TEST_F(AggregatedMemoryHistogramTest, TwoSamples5) { TEST_F(AggregatedMemoryHistogramTest, TwoSamples5) {
FLAG_histogram_interval = 10; FLAG_histogram_interval = 10;
AddSample(10, 0); AddSample(10, 0);
...@@ -274,7 +264,6 @@ TEST_F(AggregatedMemoryHistogramTest, TwoSamples5) { ...@@ -274,7 +264,6 @@ TEST_F(AggregatedMemoryHistogramTest, TwoSamples5) {
EXPECT_EQ(750, (*samples())[1]); EXPECT_EQ(750, (*samples())[1]);
} }
TEST_F(AggregatedMemoryHistogramTest, TwoSamples6) { TEST_F(AggregatedMemoryHistogramTest, TwoSamples6) {
FLAG_histogram_interval = 10; FLAG_histogram_interval = 10;
AddSample(10, 0); AddSample(10, 0);
...@@ -285,7 +274,6 @@ TEST_F(AggregatedMemoryHistogramTest, TwoSamples6) { ...@@ -285,7 +274,6 @@ TEST_F(AggregatedMemoryHistogramTest, TwoSamples6) {
EXPECT_EQ(1000, (*samples())[1]); EXPECT_EQ(1000, (*samples())[1]);
} }
TEST_F(AggregatedMemoryHistogramTest, TwoSamples7) { TEST_F(AggregatedMemoryHistogramTest, TwoSamples7) {
FLAG_histogram_interval = 10; FLAG_histogram_interval = 10;
AddSample(10, 0); AddSample(10, 0);
...@@ -297,7 +285,6 @@ TEST_F(AggregatedMemoryHistogramTest, TwoSamples7) { ...@@ -297,7 +285,6 @@ TEST_F(AggregatedMemoryHistogramTest, TwoSamples7) {
EXPECT_EQ((250 + 500) / 2, (*samples())[1]); EXPECT_EQ((250 + 500) / 2, (*samples())[1]);
} }
TEST_F(AggregatedMemoryHistogramTest, TwoSamples8) { TEST_F(AggregatedMemoryHistogramTest, TwoSamples8) {
FLAG_histogram_interval = 10; FLAG_histogram_interval = 10;
AddSample(10, 1000); AddSample(10, 1000);
...@@ -309,7 +296,6 @@ TEST_F(AggregatedMemoryHistogramTest, TwoSamples8) { ...@@ -309,7 +296,6 @@ TEST_F(AggregatedMemoryHistogramTest, TwoSamples8) {
EXPECT_EQ((750 + 500) / 2, (*samples())[1]); EXPECT_EQ((750 + 500) / 2, (*samples())[1]);
} }
TEST_F(AggregatedMemoryHistogramTest, ManySamples1) { TEST_F(AggregatedMemoryHistogramTest, ManySamples1) {
FLAG_histogram_interval = 10; FLAG_histogram_interval = 10;
const int kMaxSamples = 1000; const int kMaxSamples = 1000;
...@@ -321,7 +307,6 @@ TEST_F(AggregatedMemoryHistogramTest, ManySamples1) { ...@@ -321,7 +307,6 @@ TEST_F(AggregatedMemoryHistogramTest, ManySamples1) {
} }
} }
TEST_F(AggregatedMemoryHistogramTest, ManySamples2) { TEST_F(AggregatedMemoryHistogramTest, ManySamples2) {
FLAG_histogram_interval = 10; FLAG_histogram_interval = 10;
const int kMaxSamples = 1000; const int kMaxSamples = 1000;
......
...@@ -26,7 +26,6 @@ TEST(CharPredicatesTest, WhiteSpace) { ...@@ -26,7 +26,6 @@ TEST(CharPredicatesTest, WhiteSpace) {
EXPECT_FALSE(IsWhiteSpace(0x180E)); EXPECT_FALSE(IsWhiteSpace(0x180E));
} }
TEST(CharPredicatesTest, WhiteSpaceOrLineTerminator) { TEST(CharPredicatesTest, WhiteSpaceOrLineTerminator) {
EXPECT_TRUE(IsWhiteSpaceOrLineTerminator(0x0009)); EXPECT_TRUE(IsWhiteSpaceOrLineTerminator(0x0009));
EXPECT_TRUE(IsWhiteSpaceOrLineTerminator(0x000B)); EXPECT_TRUE(IsWhiteSpaceOrLineTerminator(0x000B));
...@@ -47,7 +46,6 @@ TEST(CharPredicatesTest, WhiteSpaceOrLineTerminator) { ...@@ -47,7 +46,6 @@ TEST(CharPredicatesTest, WhiteSpaceOrLineTerminator) {
EXPECT_FALSE(IsWhiteSpaceOrLineTerminator(0x180E)); EXPECT_FALSE(IsWhiteSpaceOrLineTerminator(0x180E));
} }
TEST(CharPredicatesTest, IdentifierStart) { TEST(CharPredicatesTest, IdentifierStart) {
EXPECT_TRUE(IsIdentifierStart('$')); EXPECT_TRUE(IsIdentifierStart('$'));
EXPECT_TRUE(IsIdentifierStart('_')); EXPECT_TRUE(IsIdentifierStart('_'));
...@@ -89,7 +87,6 @@ TEST(CharPredicatesTest, IdentifierStart) { ...@@ -89,7 +87,6 @@ TEST(CharPredicatesTest, IdentifierStart) {
#endif #endif
} }
TEST(CharPredicatesTest, IdentifierPart) { TEST(CharPredicatesTest, IdentifierPart) {
EXPECT_TRUE(IsIdentifierPart('$')); EXPECT_TRUE(IsIdentifierPart('$'));
EXPECT_TRUE(IsIdentifierPart('_')); EXPECT_TRUE(IsIdentifierPart('_'));
......
...@@ -19,7 +19,6 @@ TEST(LockedQueue, ConstructorEmpty) { ...@@ -19,7 +19,6 @@ TEST(LockedQueue, ConstructorEmpty) {
EXPECT_TRUE(queue.IsEmpty()); EXPECT_TRUE(queue.IsEmpty());
} }
TEST(LockedQueue, SingleRecordEnqueueDequeue) { TEST(LockedQueue, SingleRecordEnqueueDequeue) {
LockedQueue<Record> queue; LockedQueue<Record> queue;
EXPECT_TRUE(queue.IsEmpty()); EXPECT_TRUE(queue.IsEmpty());
...@@ -32,7 +31,6 @@ TEST(LockedQueue, SingleRecordEnqueueDequeue) { ...@@ -32,7 +31,6 @@ TEST(LockedQueue, SingleRecordEnqueueDequeue) {
EXPECT_TRUE(queue.IsEmpty()); EXPECT_TRUE(queue.IsEmpty());
} }
TEST(LockedQueue, Peek) { TEST(LockedQueue, Peek) {
LockedQueue<Record> queue; LockedQueue<Record> queue;
EXPECT_TRUE(queue.IsEmpty()); EXPECT_TRUE(queue.IsEmpty());
...@@ -49,7 +47,6 @@ TEST(LockedQueue, Peek) { ...@@ -49,7 +47,6 @@ TEST(LockedQueue, Peek) {
EXPECT_TRUE(queue.IsEmpty()); EXPECT_TRUE(queue.IsEmpty());
} }
TEST(LockedQueue, PeekOnEmpty) { TEST(LockedQueue, PeekOnEmpty) {
LockedQueue<Record> queue; LockedQueue<Record> queue;
EXPECT_TRUE(queue.IsEmpty()); EXPECT_TRUE(queue.IsEmpty());
...@@ -58,7 +55,6 @@ TEST(LockedQueue, PeekOnEmpty) { ...@@ -58,7 +55,6 @@ TEST(LockedQueue, PeekOnEmpty) {
EXPECT_FALSE(success); EXPECT_FALSE(success);
} }
TEST(LockedQueue, MultipleRecords) { TEST(LockedQueue, MultipleRecords) {
LockedQueue<Record> queue; LockedQueue<Record> queue;
EXPECT_TRUE(queue.IsEmpty()); EXPECT_TRUE(queue.IsEmpty());
......
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