Index: runtime/vm/thread_test.cc |
diff --git a/runtime/vm/thread_test.cc b/runtime/vm/thread_test.cc |
index c20f19ef8603c228be9387b98503a032274623d8..befe7a8ac62fcf18ea010a0dc85514f3e7e4d624 100644 |
--- a/runtime/vm/thread_test.cc |
+++ b/runtime/vm/thread_test.cc |
@@ -5,11 +5,11 @@ |
#include "platform/assert.h" |
#include "vm/isolate.h" |
#include "vm/lockers.h" |
-#include "vm/unit_test.h" |
#include "vm/profiler.h" |
#include "vm/safepoint.h" |
#include "vm/stack_frame.h" |
#include "vm/thread_pool.h" |
+#include "vm/unit_test.h" |
namespace dart { |
@@ -34,7 +34,6 @@ VM_UNIT_TEST_CASE(Mutex) { |
delete mutex; |
} |
- |
VM_UNIT_TEST_CASE(Monitor) { |
// This unit test case needs a running isolate. |
Dart_CreateIsolate(NULL, NULL, bin::core_isolate_snapshot_data, |
@@ -81,7 +80,6 @@ VM_UNIT_TEST_CASE(Monitor) { |
delete monitor; |
} |
- |
class ObjectCounter : public ObjectPointerVisitor { |
public: |
explicit ObjectCounter(Isolate* isolate, const Object* obj) |
@@ -102,7 +100,6 @@ class ObjectCounter : public ObjectPointerVisitor { |
intptr_t count_; |
}; |
- |
class TaskWithZoneAllocation : public ThreadPool::Task { |
public: |
TaskWithZoneAllocation(Isolate* isolate, |
@@ -172,7 +169,6 @@ class TaskWithZoneAllocation : public ThreadPool::Task { |
intptr_t id_; |
}; |
- |
ISOLATE_UNIT_TEST_CASE(ManyTasksWithZones) { |
const int kTaskCount = 100; |
Monitor sync[kTaskCount]; |
@@ -204,7 +200,6 @@ ISOLATE_UNIT_TEST_CASE(ManyTasksWithZones) { |
} |
} |
- |
#ifndef PRODUCT |
class SimpleTaskWithZoneAllocation : public ThreadPool::Task { |
public: |
@@ -286,7 +281,6 @@ class SimpleTaskWithZoneAllocation : public ThreadPool::Task { |
bool* wait_; |
}; |
- |
TEST_CASE(ManySimpleTasksWithZones) { |
const int kTaskCount = 10; |
Monitor monitor; |
@@ -359,7 +353,6 @@ TEST_CASE(ManySimpleTasksWithZones) { |
} |
#endif |
- |
TEST_CASE(ThreadRegistry) { |
Isolate* orig = Thread::Current()->isolate(); |
Zone* orig_zone = Thread::Current()->zone(); |
@@ -388,7 +381,6 @@ TEST_CASE(ThreadRegistry) { |
EXPECT_STREQ("foo", orig_str); |
} |
- |
// A helper thread that alternatingly cooperates and organizes |
// safepoint rendezvous. At rendezvous, it explicitly visits the |
// stacks looking for a specific marker (Smi) to verify that the expected |
@@ -478,10 +470,8 @@ class SafepointTestTask : public ThreadPool::Task { |
bool local_done_; // this task has successfully safepointed >= once. |
}; |
- |
const intptr_t SafepointTestTask::kTaskCount = 5; |
- |
// Test rendezvous of: |
// - helpers in VM code, |
// - main thread in pure Dart, |
@@ -533,7 +523,6 @@ TEST_CASE(SafepointTestDart) { |
} |
} |
- |
// Test rendezvous of: |
// - helpers in VM code, and |
// - main thread in VM code, |
@@ -558,7 +547,6 @@ ISOLATE_UNIT_TEST_CASE(SafepointTestVM) { |
} |
} |
- |
// Test case for recursive safepoint operations. |
ISOLATE_UNIT_TEST_CASE(RecursiveSafepointTest1) { |
intptr_t count = 0; |
@@ -577,7 +565,6 @@ ISOLATE_UNIT_TEST_CASE(RecursiveSafepointTest1) { |
EXPECT(count == 3); |
} |
- |
ISOLATE_UNIT_TEST_CASE(ThreadIterator_Count) { |
intptr_t thread_count_0 = 0; |
intptr_t thread_count_1 = 0; |
@@ -605,20 +592,17 @@ ISOLATE_UNIT_TEST_CASE(ThreadIterator_Count) { |
EXPECT(thread_count_0 >= thread_count_1); |
} |
- |
ISOLATE_UNIT_TEST_CASE(ThreadIterator_FindSelf) { |
OSThread* current = OSThread::Current(); |
EXPECT(OSThread::IsThreadInList(current->id())); |
} |
- |
struct ThreadIteratorTestParams { |
ThreadId spawned_thread_id; |
ThreadJoinId spawned_thread_join_id; |
Monitor* monitor; |
}; |
- |
void ThreadIteratorTestMain(uword parameter) { |
ThreadIteratorTestParams* params = |
reinterpret_cast<ThreadIteratorTestParams*>(parameter); |
@@ -633,7 +617,6 @@ void ThreadIteratorTestMain(uword parameter) { |
ml.Notify(); |
} |
- |
// NOTE: This test case also verifies that known TLS destructors are called |
// on Windows. See |OnDartThreadExit| in os_thread_win.cc for more details. |
TEST_CASE(ThreadIterator_AddFindRemove) { |
@@ -660,7 +643,6 @@ TEST_CASE(ThreadIterator_AddFindRemove) { |
delete params.monitor; |
} |
- |
// Test rendezvous of: |
// - helpers in VM code, and |
// - main thread in VM code, |
@@ -696,7 +678,6 @@ ISOLATE_UNIT_TEST_CASE(SafepointTestVM2) { |
} |
} |
- |
// Test recursive safepoint operation scopes with other threads trying |
// to also start a safepoint operation scope. |
ISOLATE_UNIT_TEST_CASE(RecursiveSafepointTest2) { |
@@ -736,7 +717,6 @@ ISOLATE_UNIT_TEST_CASE(RecursiveSafepointTest2) { |
} while (!all_exited); |
} |
- |
class AllocAndGCTask : public ThreadPool::Task { |
public: |
AllocAndGCTask(Isolate* isolate, Monitor* done_monitor, bool* done) |
@@ -769,7 +749,6 @@ class AllocAndGCTask : public ThreadPool::Task { |
bool* done_; |
}; |
- |
ISOLATE_UNIT_TEST_CASE(HelperAllocAndGC) { |
Monitor done_monitor; |
bool done = false; |