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

Unified Diff: mojo/edk/util/mutex_unittest.cc

Issue 1426343002: EDK: Move mutex.*, cond_var.*, and thread_annotations.h to //mojo/edk/util. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: oops Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/util/mutex.cc ('k') | mojo/edk/util/thread_annotations.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/util/mutex_unittest.cc
diff --git a/mojo/edk/system/mutex_unittest.cc b/mojo/edk/util/mutex_unittest.cc
similarity index 95%
rename from mojo/edk/system/mutex_unittest.cc
rename to mojo/edk/util/mutex_unittest.cc
index 33d26f956fee20734771474dcbb062b5723e04b2..6730aba7ee586513a6187292b1b1b10f9188859a 100644
--- a/mojo/edk/system/mutex_unittest.cc
+++ b/mojo/edk/util/mutex_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "mojo/edk/system/mutex.h"
+#include "mojo/edk/util/mutex.h"
#include <stdlib.h>
@@ -12,12 +12,12 @@
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
-namespace system {
+namespace util {
namespace {
// Sleeps for a "very small" amount of time.
void EpsilonRandomSleep() {
- test::SleepMilliseconds(static_cast<unsigned>(rand()) % 20u);
+ system::test::SleepMilliseconds(static_cast<unsigned>(rand()) % 20u);
}
// Basic test to make sure that Lock()/Unlock()/TryLock() don't crash ----------
@@ -93,7 +93,7 @@ TEST(MutexTest, AssertHeld) {
// For non-Debug builds, |AssertHeld()| should do nothing.
mutex.AssertHeld();
#else
- EXPECT_DEATH_IF_SUPPORTED({ mutex.AssertHeld(); }, "Check failed");
+ EXPECT_DEATH_IF_SUPPORTED({ mutex.AssertHeld(); }, "pthread_mutex_lock");
#endif // defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
// TODO(vtl): Should also test the case when the mutex is held by another
@@ -197,5 +197,5 @@ TEST(MutexTest, MutexLocker) {
}
} // namespace
-} // namespace system
+} // namespace util
} // namespace mojo
« no previous file with comments | « mojo/edk/util/mutex.cc ('k') | mojo/edk/util/thread_annotations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698