mirror of
https://github.com/ceph/ceph
synced 2025-03-06 08:20:12 +00:00
do FRIEND_TEST manually
two reasons to expand FRIEND_TEST manually: * we don't need to depend on gtest if we don't do want to perform test * no need to include gtest headers in dmclock_{client,server}.h in non-test code, it slows down the compilation by introducing unecessary bits in header files. Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
b84ccf9e61
commit
d72fac147e
@ -19,8 +19,6 @@
|
||||
#include "dmclock_util.h"
|
||||
#include "dmclock_recs.h"
|
||||
|
||||
#include "gtest/gtest_prod.h"
|
||||
|
||||
|
||||
namespace crimson {
|
||||
namespace dmclock {
|
||||
@ -57,7 +55,8 @@ namespace crimson {
|
||||
// S is server identifier type
|
||||
template<typename S>
|
||||
class ServiceTracker {
|
||||
FRIEND_TEST(dmclock_client, server_erase);
|
||||
// we don't want to include gtest.h just for FRIEND_TEST
|
||||
friend class dmclock_client_server_erase_Test;
|
||||
|
||||
using TimePoint = decltype(std::chrono::steady_clock::now());
|
||||
using Duration = std::chrono::milliseconds;
|
||||
|
@ -50,8 +50,6 @@
|
||||
#include "profile.h"
|
||||
#endif
|
||||
|
||||
#include "gtest/gtest_prod.h"
|
||||
|
||||
|
||||
namespace crimson {
|
||||
|
||||
@ -235,7 +233,8 @@ namespace crimson {
|
||||
// branching factor
|
||||
template<typename C, typename R, uint B>
|
||||
class PriorityQueueBase {
|
||||
FRIEND_TEST(dmclock_server, client_idle_erase);
|
||||
// we don't want to include gtest.h just for FRIEND_TEST
|
||||
friend class dmclock_server_client_idle_erase_Test;
|
||||
|
||||
public:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user