Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(604)

Side by Side Diff: runtime/vm/thread_test.cc

Issue 463993002: - Separate the thread implementation used in bin/ and vm/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/isolate.h" 6 #include "vm/isolate.h"
7 #include "vm/lockers.h"
7 #include "vm/unit_test.h" 8 #include "vm/unit_test.h"
8 #include "vm/profiler.h" 9 #include "vm/profiler.h"
9 #include "vm/thread.h"
10 10
11 namespace dart { 11 namespace dart {
12 12
13 UNIT_TEST_CASE(Mutex) { 13 UNIT_TEST_CASE(Mutex) {
14 // This unit test case needs a running isolate. 14 // This unit test case needs a running isolate.
15 Isolate* isolate = Isolate::Init(NULL); 15 Isolate* isolate = Isolate::Init(NULL);
16 16
17 Mutex* mutex = new Mutex(); 17 Mutex* mutex = new Mutex();
18 mutex->Lock(); 18 mutex->Lock();
19 EXPECT_EQ(false, mutex->TryLock()); 19 EXPECT_EQ(false, mutex->TryLock());
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 EXPECT_LT(attempts, kNumAttempts); 70 EXPECT_LT(attempts, kNumAttempts);
71 71
72 // The isolate shutdown and the destruction of the mutex are out-of-order on 72 // The isolate shutdown and the destruction of the mutex are out-of-order on
73 // purpose. 73 // purpose.
74 isolate->Shutdown(); 74 isolate->Shutdown();
75 delete isolate; 75 delete isolate;
76 delete monitor; 76 delete monitor;
77 } 77 }
78 78
79 } // namespace dart 79 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698