Added encoding/decoding tests to TestTorrentFileGenerator.
Additionally, bug fix of finalizing Torrent segments in TorrentFile::generate()
Change-Id: Iad976e3e1c26e7ec2040d41e52a8fb1e5988beeb
diff --git a/tests/unit-tests/file-manifest.t.cpp b/tests/unit-tests/file-manifest.t.cpp
index 226ae2b..80a344e 100644
--- a/tests/unit-tests/file-manifest.t.cpp
+++ b/tests/unit-tests/file-manifest.t.cpp
@@ -391,8 +391,7 @@
BOOST_CHECK_NO_THROW(it->getFullName());
BOOST_CHECK_EQUAL(it->data_packet_size(), dataPacketSize);
BOOST_CHECK_EQUAL(it->catalog_prefix(), catalogPrefix);
- auto block = it->wireEncode();
- BOOST_CHECK_EQUAL(*it, FileManifest(block));
+ BOOST_CHECK_EQUAL(*it, FileManifest(it->wireEncode()));
if (it != manifests.end() -1) {
BOOST_CHECK_EQUAL(it->catalog().size(), subManifestSize);
BOOST_CHECK_EQUAL(*(it->submanifest_ptr()), (it+1)->getFullName());