aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/test
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2022-08-26 15:02:12 +0000
committerMauro Sardara <msardara@cisco.com>2022-09-01 13:20:29 +0000
commit940228d74920fbfd6707e1324711164360cca52d (patch)
tree1810371558a8f3efd5e9eb2e5ac042c98e354d50 /libtransport/src/test
parent8d7d5327ca86871cdf1d2ce404ca88bb2a58630f (diff)
feat(hicn-plugin): interest manifest
Ref: HICN-748 Change-Id: Ie403de53a93094dca997cec379db6f5d3ce8e6be Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'libtransport/src/test')
-rw-r--r--libtransport/src/test/test_interest.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/libtransport/src/test/test_interest.cc b/libtransport/src/test/test_interest.cc
index ba63b6c93..22dc01455 100644
--- a/libtransport/src/test/test_interest.cc
+++ b/libtransport/src/test/test_interest.cc
@@ -255,16 +255,13 @@ 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();
for (uint32_t i = 0; i < n_suffixes; i++) {
- EXPECT_EQ(*(suffix + i), (i + 1));
+ EXPECT_EQ(*(suffix + i), i);
}
}
@@ -282,16 +279,13 @@ 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);
- EXPECT_EQ(*suffix, 1U);
+ EXPECT_EQ(*suffix, 0U);
// Iterate over them. They should be in order and without repetitions
- std::vector<uint32_t> expected = {1, 2, 5, 6};
+ std::vector<uint32_t> expected = {interest.getName().getSuffix(), 1, 2, 5, 6};
EXPECT_EQ(interest.numberOfSuffixes(), expected.size());
for (uint32_t seq : expected) {