summaryrefslogtreecommitdiffstats
path: root/libtransport/src/test
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2022-07-08 16:10:13 +0000
committerMauro Sardara <msardara@cisco.com>2022-08-10 11:57:10 +0200
commit8f0a8bf572b9b8123121338a31462440bad65857 (patch)
treeecac67f0ad005b2eb0a1bd25c8f242497ffddea1 /libtransport/src/test
parent8d27045832427a0ea345f48bfb2c42f46a357af1 (diff)
feat: add interest manifest serialization/deserialization
Also: add helpers for interest manifest Ref: HICN-738 Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: Ia531605148e00ccbe446da0f4f2d8caae2b098be Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'libtransport/src/test')
-rw-r--r--libtransport/src/test/test_interest.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/libtransport/src/test/test_interest.cc b/libtransport/src/test/test_interest.cc
index 8d00a9c6d..ba63b6c93 100644
--- a/libtransport/src/test/test_interest.cc
+++ b/libtransport/src/test/test_interest.cc
@@ -255,7 +255,11 @@ TEST_F(InterestTest, AppendSuffixesEncodeAndIterate) {
// Encode them in wire format
interest.encodeSuffixes();
+ // Decode suffixes from wire format
+ interest.decodeSuffixes();
+
// Iterate over them. They should be in order and without repetitions
+
auto suffix = interest.firstSuffix();
auto n_suffixes = interest.numberOfSuffixes();
@@ -278,6 +282,9 @@ TEST_F(InterestTest, AppendSuffixesWithGaps) {
interest.encodeSuffixes();
EXPECT_TRUE(interest.hasManifest());
+ // Decode suffixes from wire format
+ interest.decodeSuffixes();
+
// Check first suffix correctness
auto suffix = interest.firstSuffix();
EXPECT_NE(suffix, nullptr);