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

Side by Side Diff: mojo/public/utility/tests/mutex_unittest.cc

Issue 213393002: Mojo: Move public C system header files to mojo/public/c/system/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 8 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
« no previous file with comments | « mojo/public/utility/mutex.h ('k') | mojo/public/utility/tests/thread_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/public/utility/mutex.h" 5 #include "mojo/public/utility/mutex.h"
6 6
7 #include <stdlib.h> // For |rand()|. 7 #include <stdlib.h> // For |rand()|.
8 #include <time.h> // For |nanosleep()| (defined by POSIX). 8 #include <time.h> // For |nanosleep()| (defined by POSIX).
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "mojo/public/system/macros.h" 12 #include "mojo/public/c/system/macros.h"
13 #include "mojo/public/utility/thread.h" 13 #include "mojo/public/utility/thread.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 namespace mojo { 16 namespace mojo {
17 namespace { 17 namespace {
18 18
19 TEST(MutexTest, TrivialSingleThreaded) { 19 TEST(MutexTest, TrivialSingleThreaded) {
20 Mutex mutex; 20 Mutex mutex;
21 21
22 mutex.Lock(); 22 mutex.Lock();
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 // Destroy lock with lock held. 253 // Destroy lock with lock held.
254 EXPECT_DEATH({ 254 EXPECT_DEATH({
255 Mutex mutex; 255 Mutex mutex;
256 mutex.Lock(); 256 mutex.Lock();
257 }, ""); 257 }, "");
258 } 258 }
259 #endif // !defined(NDEBUG) 259 #endif // !defined(NDEBUG)
260 260
261 } // namespace 261 } // namespace
262 } // namespace mojo 262 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/utility/mutex.h ('k') | mojo/public/utility/tests/thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698