Convert to span and avoid deprecated ndn-cxx functions

Change-Id: I260639ef4c13e6a492b29d3b976cca0ae29876cb
diff --git a/tests/test-full-producer.cpp b/tests/test-full-producer.cpp
index f2c4a13..1ea3119 100644
--- a/tests/test-full-producer.cpp
+++ b/tests/test-full-producer.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis
+ * Copyright (c) 2014-2022,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -80,7 +80,7 @@
   BOOST_CHECK_NO_THROW(node.onSyncData(syncInterest, badCompress));
 
   const uint8_t test[] = {'t', 'e', 's', 't'};
-  auto goodCompressBadBlock = detail::compress(node.m_contentCompression, test, sizeof(test));
+  auto goodCompressBadBlock = detail::compress(node.m_contentCompression, test);
   BOOST_CHECK_NO_THROW(node.onSyncData(syncInterest, goodCompressBadBlock));
 }
 
diff --git a/tests/test-full-sync.cpp b/tests/test-full-sync.cpp
index 8aa9c8e..d3d9e03 100644
--- a/tests/test-full-sync.cpp
+++ b/tests/test-full-sync.cpp
@@ -476,7 +476,7 @@
     state.addContent(Name(prefixToPublish).appendNumber(nodes[0]->m_prefixes[prefixToPublish]));
 
     auto block = state.wireEncode();
-    compressed = detail::compress(nodes[0]->m_contentCompression, block.wire(), block.size());
+    compressed = detail::compress(nodes[0]->m_contentCompression, block);
   } while (compressed->size() < (ndn::MAX_NDN_PACKET_SIZE >> 1));
 
   advanceClocks(10_ms, 100);
diff --git a/tests/test-iblt.cpp b/tests/test-iblt.cpp
index b2f4d3e..1f00564 100644
--- a/tests/test-iblt.cpp
+++ b/tests/test-iblt.cpp
@@ -97,9 +97,8 @@
 
   Name malformedName("/test");
   auto compressed = compress(CompressionScheme::DEFAULT,
-                             malformedName.wireEncode().value(),
-                             malformedName.wireEncode().value_size());
-  malformedName.append(compressed->data(), compressed->size());
+                             malformedName.wireEncode().value_bytes());
+  malformedName.append(name::Component(std::move(compressed)));
   IBLT rcvd2(size, CompressionScheme::DEFAULT);
   BOOST_CHECK_THROW(rcvd2.initialize(malformedName.at(-1)), IBLT::Error);
 }
diff --git a/tests/test-util.cpp b/tests/test-util.cpp
index e37957a..8020fe4 100644
--- a/tests/test-util.cpp
+++ b/tests/test-util.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis
+ * Copyright (c) 2014-2022,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -56,14 +56,14 @@
   const uint8_t uncompressed[] = {'t', 'e', 's', 't'};
 
   for (const auto& s : supported) {
-    BOOST_CHECK_NO_THROW(compress(s, uncompressed, sizeof(uncompressed)));
-    auto compressed = compress(s, uncompressed, sizeof(uncompressed));
-    BOOST_CHECK_NO_THROW(decompress(s, compressed->data(), compressed->size()));
+    BOOST_CHECK_NO_THROW(compress(s, uncompressed));
+    auto compressed = compress(s, uncompressed);
+    BOOST_CHECK_NO_THROW(decompress(s, *compressed));
   }
 
   for (const auto& s : notSupported) {
-    BOOST_CHECK_THROW(compress(s, uncompressed, sizeof(uncompressed)), CompressionError);
-    BOOST_CHECK_THROW(decompress(s, uncompressed, sizeof(uncompressed)), CompressionError);
+    BOOST_CHECK_THROW(compress(s, uncompressed), CompressionError);
+    BOOST_CHECK_THROW(decompress(s, uncompressed), CompressionError);
   }
 }