cmake/tests: add DHTNET_TESTABLE

Change-Id: Id327a60cbd1afb57a35eedfcb73ff972acf6fb4b
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a458489..4a72860 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,6 +80,9 @@
     $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
     $<INSTALL_INTERFACE:include>
 )
+if (BUILD_TESTING)
+    target_compile_definitions(dhtnet PUBLIC DHTNET_TESTABLE)
+endif()
 target_compile_definitions(dhtnet PUBLIC PJ_AUTOCONF=1)
 # set_target_properties(dhtnet PROPERTIES PUBLIC_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/include/${dhtnet_HEADERS}")
 
diff --git a/include/multiplexed_socket.h b/include/multiplexed_socket.h
index 1d37166..a090a8c 100644
--- a/include/multiplexed_socket.h
+++ b/include/multiplexed_socket.h
@@ -162,7 +162,7 @@
 
     void eraseChannel(uint16_t channel);
 
-#ifdef LIBJAMI_TESTABLE
+#ifdef DHTNET_TESTABLE
     /**
      * Check if we can send beacon on the socket
      */
@@ -341,7 +341,7 @@
      */
     std::shared_ptr<dht::crypto::Certificate> peerCertificate() const;
 
-#ifdef LIBJAMI_TESTABLE
+#ifdef DHTNET_TESTABLE
     std::shared_ptr<MultiplexedSocket> underlyingSocket() const;
 #endif
 
diff --git a/src/multiplexed_socket.cpp b/src/multiplexed_socket.cpp
index 9c6d59d..97c9e1c 100644
--- a/src/multiplexed_socket.cpp
+++ b/src/multiplexed_socket.cpp
@@ -718,7 +718,7 @@
     return pimpl_->endpoint->peerCertificate();
 }
 
-#ifdef LIBJAMI_TESTABLE
+#ifdef DHTNET_TESTABLE
 bool
 MultiplexedSocket::canSendBeacon() const
 {
@@ -1038,7 +1038,7 @@
     pimpl_->cv.notify_all();
 }
 
-#ifdef LIBJAMI_TESTABLE
+#ifdef DHTNET_TESTABLE
 std::shared_ptr<MultiplexedSocket>
 ChannelSocket::underlyingSocket() const
 {