tests: introduce unit testing

As a sample, this commit also includes a test suite for
ndn::ping::client::StatisticsCollector class.

refs #2795

Change-Id: Ia0c7522ae26bee1cc9d172c7379ab62f84325ed7
diff --git a/core/common.hpp b/core/common.hpp
index 2b031cc..fa035c6 100644
--- a/core/common.hpp
+++ b/core/common.hpp
@@ -26,6 +26,18 @@
 #ifndef NDN_TOOLS_CORE_COMMON_HPP
 #define NDN_TOOLS_CORE_COMMON_HPP
 
+#ifdef WITH_TESTS
+#define VIRTUAL_WITH_TESTS virtual
+#define PUBLIC_WITH_TESTS_ELSE_PROTECTED public
+#define PUBLIC_WITH_TESTS_ELSE_PRIVATE public
+#define PROTECTED_WITH_TESTS_ELSE_PRIVATE protected
+#else
+#define VIRTUAL_WITH_TESTS
+#define PUBLIC_WITH_TESTS_ELSE_PROTECTED protected
+#define PUBLIC_WITH_TESTS_ELSE_PRIVATE private
+#define PROTECTED_WITH_TESTS_ELSE_PRIVATE private
+#endif
+
 #include <cinttypes>
 #include <cstddef>