Move non-public classes and functions to psync::detail namespace
CompressionScheme, CompressionError, and MissingDataInfo, which are
public types, are instead moved to a new header PSync/common.hpp
Change-Id: If1b8cb037cb321ff32c080c67df9dc3689223c00
diff --git a/tests/test-state.cpp b/tests/test-state.cpp
index 3f04c8b..0e31a67 100644
--- a/tests/test-state.cpp
+++ b/tests/test-state.cpp
@@ -24,8 +24,7 @@
#include <ndn-cxx/data.hpp>
namespace psync {
-
-using namespace ndn;
+namespace detail {
BOOST_AUTO_TEST_SUITE(TestState)
@@ -36,17 +35,14 @@
state.addContent(ndn::Name("test2"));
// Simulate getting buffer content from segment fetcher
- Data data;
+ ndn::Data data;
data.setContent(state.wireEncode());
ndn::Buffer buffer(data.getContent().value_size());
std::copy(data.getContent().value_begin(),
data.getContent().value_end(),
buffer.begin());
- ndn::ConstBufferPtr bufferPtr = make_shared<ndn::Buffer>(buffer);
-
- ndn::Block block(std::move(bufferPtr));
-
+ ndn::Block block(std::make_shared<ndn::Buffer>(buffer));
State rcvdState;
rcvdState.wireDecode(block);
@@ -58,16 +54,14 @@
State state;
// Simulate getting buffer content from segment fetcher
- Data data;
+ ndn::Data data;
data.setContent(state.wireEncode());
ndn::Buffer buffer(data.getContent().value_size());
std::copy(data.getContent().value_begin(),
data.getContent().value_end(),
buffer.begin());
- ndn::ConstBufferPtr bufferPtr = make_shared<ndn::Buffer>(buffer);
- ndn::Block block(std::move(bufferPtr));
-
+ ndn::Block block(std::make_shared<ndn::Buffer>(buffer));
BOOST_CHECK_NO_THROW(State state2(block));
State state2(block);
@@ -90,4 +84,5 @@
BOOST_AUTO_TEST_SUITE_END()
+} // namespace detail
} // namespace psync