interest: auto-generating random nonce if not set
Change-Id: Ib3aac0b7d4b1fd38f13dff2c57a4d1dfc77592ff
diff --git a/tests_boost/test-encode-decode-interest.cpp b/tests_boost/test-encode-decode-interest.cpp
index ddfe03a..ca2ffeb 100644
--- a/tests_boost/test-encode-decode-interest.cpp
+++ b/tests_boost/test-encode-decode-interest.cpp
@@ -28,7 +28,7 @@
0xe, 0x0,
0x3, 0x4, 0x79, 0x79, 0x79, 0x79,
0xc, 0x1, 0x1,
- 0x5, 0x1, 0x0,
+ 0x5, 0x1, 0x1,
0x6, 0x1, 0x1,
0x7, 0x2, 0x3, 0xe8
};
@@ -48,6 +48,7 @@
BOOST_REQUIRE_EQUAL(i.getChildSelector(), 1);
BOOST_REQUIRE_EQUAL(i.getMustBeFresh(), false);
BOOST_REQUIRE_EQUAL(i.getExclude().toUri(), "alex,xxxx,*,yyyy");
+ BOOST_REQUIRE_EQUAL(i.getNonce(), 1);
}
BOOST_AUTO_TEST_CASE (Encode)
@@ -60,6 +61,7 @@
i.setChildSelector(1);
i.setMustBeFresh(false);
i.getExclude().excludeOne("alex").excludeRange("xxxx", "yyyy");
+ i.setNonce(1);
const Block &wire = i.wireEncode();
BOOST_REQUIRE_EQUAL_COLLECTIONS(Interest1, Interest1+sizeof(Interest1),