Fix the Mac build, and clean up some test-only code.

Change-Id: Ie0acf7ac5e99153d153a0d5f40e9b69cecb4942b
diff --git a/src/mutex.h b/src/mutex.h
index 475c7dd..02d127f 100644
--- a/src/mutex.h
+++ b/src/mutex.h
@@ -23,6 +23,7 @@
 #include <iosfwd>
 #include <string>
 
+#include "gtest/gtest.h"
 #include "logging.h"
 #include "macros.h"
 
@@ -74,12 +75,6 @@
 
   pid_t GetOwner();
 
-  void AssertDepth(uint32_t depth) {
-#if !defined(__APPLE__)
-    DCHECK_EQ(depth, GetDepth());
-#endif
-  }
-
  private:
   static pid_t GetTid();
 
@@ -89,6 +84,7 @@
   std::string name_;
   MutexRank rank_;
 
+  friend class MutexTester;
   DISALLOW_COPY_AND_ASSIGN(Mutex);
 };