encoding: convert to span

Change-Id: I8bd73284fbd5acc0ff8ad2626af9b4324e9df7a1
diff --git a/tests/unit/lp/packet.t.cpp b/tests/unit/lp/packet.t.cpp
index 5f750c3..7763f06 100644
--- a/tests/unit/lp/packet.t.cpp
+++ b/tests/unit/lp/packet.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2020 Regents of the University of California.
+ * Copyright (c) 2013-2022 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -197,7 +197,7 @@
   };
 
   Packet packet;
-  Block wire(inputBlock, sizeof(inputBlock));
+  Block wire(inputBlock);
   packet.wireDecode(wire);
 
   BOOST_CHECK_EQUAL(packet.count<FragIndexField>(), 1);
@@ -231,7 +231,7 @@
   };
 
   Packet packet;
-  Block wire(inputBlock, sizeof(inputBlock));
+  Block wire(inputBlock);
   packet.wireDecode(wire);
   BOOST_CHECK_EQUAL(0, packet.count<FragmentField>());
   BOOST_CHECK_EQUAL(1, packet.count<FragIndexField>());
@@ -249,7 +249,7 @@
   };
 
   Packet packet;
-  Block wire(inputBlock, sizeof(inputBlock));
+  Block wire(inputBlock);
   packet.wireDecode(wire);
   BOOST_CHECK_EQUAL(1, packet.count<FragmentField>());
   BOOST_CHECK_EQUAL(0, packet.count<FragIndexField>());
@@ -268,7 +268,7 @@
   };
 
   Packet packet;
-  Block wire(inputBlock, sizeof(inputBlock));
+  Block wire(inputBlock);
   packet.wireDecode(wire);
   BOOST_CHECK_EQUAL(true, packet.has<NonDiscoveryField>());
   packet.get<NonDiscoveryField>();
@@ -281,7 +281,7 @@
   };
 
   Packet packet;
-  Block wire(inputBlock, sizeof(inputBlock));
+  Block wire(inputBlock);
   packet.wireDecode(wire);
   BOOST_CHECK_EQUAL(0, packet.count<FragmentField>());
   BOOST_CHECK_EQUAL(0, packet.count<FragIndexField>());
@@ -299,7 +299,7 @@
   };
 
   Packet packet;
-  Block wire(inputBlock, sizeof(inputBlock));
+  Block wire(inputBlock);
   BOOST_CHECK_THROW(packet.wireDecode(wire), Packet::Error);
 }
 
@@ -314,7 +314,7 @@
   };
 
   Packet packet;
-  Block wire(inputBlock, sizeof(inputBlock));
+  Block wire(inputBlock);
   BOOST_CHECK_THROW(packet.wireDecode(wire), Packet::Error);
 }
 
@@ -331,7 +331,7 @@
   };
 
   Packet packet;
-  Block wire(inputBlock, sizeof(inputBlock));
+  Block wire(inputBlock);
   BOOST_CHECK_THROW(packet.wireDecode(wire), Packet::Error);
 }
 
@@ -348,7 +348,7 @@
   };
 
   Packet packet;
-  Block wire(inputBlock, sizeof(inputBlock));
+  Block wire(inputBlock);
   BOOST_CHECK_THROW(packet.wireDecode(wire), Packet::Error);
 }
 
@@ -365,7 +365,7 @@
   };
 
   Packet packet;
-  Block wire(inputBlock, sizeof(inputBlock));
+  Block wire(inputBlock);
   packet.wireDecode(wire);
   BOOST_CHECK_EQUAL(1, packet.count<FragmentField>());
   BOOST_CHECK_EQUAL(1, packet.count<FragIndexField>());
@@ -384,7 +384,7 @@
   };
 
   Packet packet;
-  Block wire(inputBlock, sizeof(inputBlock));
+  Block wire(inputBlock);
   BOOST_CHECK_THROW(packet.wireDecode(wire), Packet::Error);
 }
 
@@ -399,7 +399,7 @@
   };
 
   Packet packet;
-  Block wire(inputBlock, sizeof(inputBlock));
+  Block wire(inputBlock);
   packet.wireDecode(wire);
   BOOST_CHECK_EQUAL(1, packet.count<FragmentField>());
 
@@ -423,7 +423,7 @@
 BOOST_AUTO_TEST_CASE(DecodeUnrecognizedTlvType)
 {
   Packet packet;
-  Block wire = encoding::makeEmptyBlock(ndn::tlv::Name);
+  Block wire = makeEmptyBlock(ndn::tlv::Name);
   BOOST_CHECK_THROW(packet.wireDecode(wire), Packet::Error);
 }