Commit 5992acc2 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

Merge base unit tests into src to be in line with Chrome.

We still need the test/base-unittests folder until the test driver is
updated to handle unittests without the boilerplate.

TEST=base-unittests
R=svenpanne@chromium.org
BUG=v8:3489
LOG=n

Review URL: https://codereview.chromium.org/520503004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23516 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 9514d34e
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
'type': 'none', 'type': 'none',
'dependencies': [ 'dependencies': [
'../samples/samples.gyp:*', '../samples/samples.gyp:*',
'../src/base/base.gyp:*',
'../src/d8.gyp:d8', '../src/d8.gyp:d8',
'../test/base-unittests/base-unittests.gyp:*',
'../test/cctest/cctest.gyp:*', '../test/cctest/cctest.gyp:*',
'../test/compiler-unittests/compiler-unittests.gyp:*', '../test/compiler-unittests/compiler-unittests.gyp:*',
'../test/heap-unittests/heap-unittests.gyp:*', '../test/heap-unittests/heap-unittests.gyp:*',
......
...@@ -4,6 +4,7 @@ include_rules = [ ...@@ -4,6 +4,7 @@ include_rules = [
"+src/compiler/pipeline.h", "+src/compiler/pipeline.h",
"-src/libplatform", "-src/libplatform",
"-include/libplatform", "-include/libplatform",
"+testing",
] ]
specific_include_rules = { specific_include_rules = {
......
...@@ -54,7 +54,7 @@ class ThreadWithMutexAndConditionVariable V8_FINAL : public Thread { ...@@ -54,7 +54,7 @@ class ThreadWithMutexAndConditionVariable V8_FINAL : public Thread {
Mutex mutex_; Mutex mutex_;
}; };
} } // namespace
TEST(ConditionVariable, MultipleThreadsWithSeparateConditionVariables) { TEST(ConditionVariable, MultipleThreadsWithSeparateConditionVariables) {
...@@ -135,7 +135,7 @@ class ThreadWithSharedMutexAndConditionVariable V8_FINAL : public Thread { ...@@ -135,7 +135,7 @@ class ThreadWithSharedMutexAndConditionVariable V8_FINAL : public Thread {
Mutex* mutex_; Mutex* mutex_;
}; };
} } // namespace
TEST(ConditionVariable, MultipleThreadsWithSharedSeparateConditionVariables) { TEST(ConditionVariable, MultipleThreadsWithSharedSeparateConditionVariables) {
...@@ -263,7 +263,7 @@ class LoopIncrementThread V8_FINAL : public Thread { ...@@ -263,7 +263,7 @@ class LoopIncrementThread V8_FINAL : public Thread {
Mutex* mutex_; Mutex* mutex_;
}; };
} } // namespace
TEST(ConditionVariable, LoopIncrement) { TEST(ConditionVariable, LoopIncrement) {
...@@ -275,10 +275,10 @@ TEST(ConditionVariable, LoopIncrement) { ...@@ -275,10 +275,10 @@ TEST(ConditionVariable, LoopIncrement) {
int counter = 0; int counter = 0;
// Setup the threads. // Setup the threads.
Thread** threads = new Thread*[thread_count]; Thread** threads = new Thread* [thread_count];
for (int n = 0; n < thread_count; ++n) { for (int n = 0; n < thread_count; ++n) {
threads[n] = new LoopIncrementThread( threads[n] = new LoopIncrementThread(n, &counter, limit, thread_count,
n, &counter, limit, thread_count, &cv, &mutex); &cv, &mutex);
} }
// Start all threads. // Start all threads.
......
...@@ -36,7 +36,7 @@ class SelfJoinThread V8_FINAL : public Thread { ...@@ -36,7 +36,7 @@ class SelfJoinThread V8_FINAL : public Thread {
virtual void Run() V8_OVERRIDE { Join(); } virtual void Run() V8_OVERRIDE { Join(); }
}; };
} } // namespace
TEST(Thread, SelfJoin) { TEST(Thread, SelfJoin) {
...@@ -97,7 +97,7 @@ class ThreadLocalStorageTest : public Thread, public ::testing::Test { ...@@ -97,7 +97,7 @@ class ThreadLocalStorageTest : public Thread, public ::testing::Test {
Thread::LocalStorageKey keys_[256]; Thread::LocalStorageKey keys_[256];
}; };
} } // namespace
TEST_F(ThreadLocalStorageTest, DoTest) { TEST_F(ThreadLocalStorageTest, DoTest) {
......
...@@ -139,7 +139,7 @@ static void ResolutionTest(T (*Now)(), TimeDelta target_granularity) { ...@@ -139,7 +139,7 @@ static void ResolutionTest(T (*Now)(), TimeDelta target_granularity) {
EXPECT_LE(delta, target_granularity); EXPECT_LE(delta, target_granularity);
} }
} } // namespace
TEST(Time, NowResolution) { TEST(Time, NowResolution) {
......
include_rules = [
"-include",
"+include/v8config.h",
"+include/v8stdint.h",
"-src",
"+src/base",
"+testing/gtest",
"+testing/gtest-support.h",
]
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