model: Adding support for "fake" content object signatures
diff --git a/test/ndnSIM-serialization.cc b/test/ndnSIM-serialization.cc
index 2d42d93..1f1d2d6 100644
--- a/test/ndnSIM-serialization.cc
+++ b/test/ndnSIM-serialization.cc
@@ -82,6 +82,13 @@
source.SetTimestamp (Seconds (100));
NS_TEST_ASSERT_MSG_EQ (source.GetTimestamp (), Seconds (100), "set/get timestamp failed");
+ NS_TEST_ASSERT_MSG_EQ (source.GetSignature (), 0, "initialization of signature failed");
+ int size = source.GetSerializedSize ();
+ source.SetSignature (10);
+ NS_TEST_ASSERT_MSG_EQ (source.GetSignature (), 10, "set/get signature failed");
+
+ NS_TEST_ASSERT_MSG_EQ (source.GetSerializedSize (), size + 4, "Signature size should have increased by 4");
+
Packet packet (0);
//serialization
packet.AddHeader (source);
@@ -93,6 +100,7 @@
NS_TEST_ASSERT_MSG_EQ (source.GetName () , target.GetName () , "source/target name failed");
NS_TEST_ASSERT_MSG_EQ (source.GetFreshness (), target.GetFreshness (), "source/target freshness failed");
NS_TEST_ASSERT_MSG_EQ (source.GetTimestamp (), target.GetTimestamp (), "source/target timestamp failed");
+ NS_TEST_ASSERT_MSG_EQ (source.GetSignature (), target.GetSignature (), "source/target signature failed");
}
}