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/tools/ping/client/statistics-collector.hpp b/tools/ping/client/statistics-collector.hpp
index 685ff1f..76278db 100644
--- a/tools/ping/client/statistics-collector.hpp
+++ b/tools/ping/client/statistics-collector.hpp
@@ -64,6 +64,13 @@
StatisticsCollector(Ping& ping, const Options& options);
/**
+ * Returns ping statistics as structure
+ */
+ Statistics
+ computeStatistics();
+
+PUBLIC_WITH_TESTS_ELSE_PRIVATE:
+ /**
* Called on ping response received
* @param rtt round trip time
*/
@@ -76,12 +83,6 @@
void
recordTimeout();
- /**
- * Returns ping statistics as structure
- */
- Statistics
- computeStatistics();
-
private:
Ping& m_ping;
const Options& m_options;