From 8f0a8bf572b9b8123121338a31462440bad65857 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Fri, 8 Jul 2022 16:10:13 +0000 Subject: feat: add interest manifest serialization/deserialization Also: add helpers for interest manifest Ref: HICN-738 Signed-off-by: Mauro Sardara Change-Id: Ia531605148e00ccbe446da0f4f2d8caae2b098be Signed-off-by: Mauro Sardara --- libtransport/src/test/test_interest.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libtransport/src/test/test_interest.cc') 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); -- cgit 1.2.3-korg