Solving a couple of bugs resulting from the packet format changes. Code compiles, but haven't fully tested yet
diff --git a/test/ndnSIM-serialization.cc b/test/ndnSIM-serialization.cc
index dff675e..bb4a573 100644
--- a/test/ndnSIM-serialization.cc
+++ b/test/ndnSIM-serialization.cc
@@ -37,28 +37,10 @@
InterestSerializationTest::DoRun ()
{
InterestHeader source;
- source.SetName (Create<NameComponents> (boost::lexical_cast<NameComponents> ("/test/test2")));
+
+ source.SetName (Create<NameComponents> (boost::lexical_cast<NameComponents> ("/test/test2")));
NS_TEST_ASSERT_MSG_EQ (source.GetName (), boost::lexical_cast<NameComponents> ("/test/test2"), "set/get name failed");
- source.SetMinSuffixComponents (20);
- NS_TEST_ASSERT_MSG_EQ (source.GetMinSuffixComponents (), 20, "set/get minSuffixComponents failed");
-
- source.SetMaxSuffixComponents (40);
- NS_TEST_ASSERT_MSG_EQ (source.GetMaxSuffixComponents (), 40, "set/get maxSuffixComponents failed");
-
- source.SetExclude (Create<NameComponents> (boost::lexical_cast<NameComponents> ("/exclude/exclude2")));
- NS_TEST_ASSERT_MSG_EQ (source.GetExclude (), boost::lexical_cast<NameComponents> ("/exclude/exclude2"), "set/get exclude failed");
-
- source.SetChildSelector (false);
- NS_TEST_ASSERT_MSG_EQ (source.IsEnabledChildSelector (), false, "set/get child selector failed");
- source.SetChildSelector (true);
- NS_TEST_ASSERT_MSG_EQ (source.IsEnabledChildSelector (), true, "set/get child selector failed");
-
- source.SetAnswerOriginKind (false);
- NS_TEST_ASSERT_MSG_EQ (source.IsEnabledAnswerOriginKind (), false, "set/get answer origin kind failed");
- source.SetAnswerOriginKind (true);
- NS_TEST_ASSERT_MSG_EQ (source.IsEnabledAnswerOriginKind (), true, "set/get answer origin kind failed");
-
source.SetScope (2);
NS_TEST_ASSERT_MSG_EQ (source.GetScope (), 2, "set/get scope failed");
@@ -79,16 +61,11 @@
InterestHeader target;
packet.RemoveHeader (target);
- NS_TEST_ASSERT_MSG_EQ (source.GetName () , target.GetName () , "source/target name failed");
- NS_TEST_ASSERT_MSG_EQ (source.GetMinSuffixComponents () , target.GetMinSuffixComponents () , "source/target minSuffixComponents failed");
- NS_TEST_ASSERT_MSG_EQ (source.GetMaxSuffixComponents () , target.GetMaxSuffixComponents () , "source/target maxSuffixComponents failed");
- NS_TEST_ASSERT_MSG_EQ (source.GetExclude () , target.GetExclude () , "source/target exclude failed");
- NS_TEST_ASSERT_MSG_EQ (source.IsEnabledChildSelector () , target.IsEnabledChildSelector () , "source/target child selector failed");
- NS_TEST_ASSERT_MSG_EQ (source.IsEnabledAnswerOriginKind (), target.IsEnabledAnswerOriginKind (), "source/target answer origin kind failed");
- NS_TEST_ASSERT_MSG_EQ (source.GetScope () , target.GetScope () , "source/target scope failed");
- NS_TEST_ASSERT_MSG_EQ (source.GetInterestLifetime () , target.GetInterestLifetime () , "source/target interest lifetime failed");
- NS_TEST_ASSERT_MSG_EQ (source.GetNonce () , target.GetNonce () , "source/target nonce failed");
- NS_TEST_ASSERT_MSG_EQ (source.GetNack () , target.GetNack () , "source/target NACK failed");
+ NS_TEST_ASSERT_MSG_EQ (source.GetName () , target.GetName () , "source/target name failed");
+ NS_TEST_ASSERT_MSG_EQ (source.GetScope () , target.GetScope () , "source/target scope failed");
+ NS_TEST_ASSERT_MSG_EQ (source.GetInterestLifetime (), target.GetInterestLifetime (), "source/target interest lifetime failed");
+ NS_TEST_ASSERT_MSG_EQ (source.GetNonce () , target.GetNonce () , "source/target nonce failed");
+ NS_TEST_ASSERT_MSG_EQ (source.GetNack () , target.GetNack () , "source/target NACK failed");
}
void