|
1128 |
|
1128 |
|
1129 |
NS_TEST_EXPECT_MSG_EQ (packet->GetSize (), 11, "trivial"); |
1129 |
NS_TEST_EXPECT_MSG_EQ (packet->GetSize (), 11, "trivial"); |
1130 |
|
1130 |
|
1131 |
std::string msg = std::string (reinterpret_cast<const char *>(packet->PeekData ()), |
1131 |
{ |
1132 |
packet->GetSize ()); |
1132 |
uint8_t *temp = new uint8_t[packet->GetSize ()]; |
1133 |
NS_TEST_EXPECT_MSG_EQ (msg, "hello world", "trivial"); |
1133 |
packet->CopyData (temp, packet->GetSize ()); |
|
|
1134 |
std::string msg = std::string (reinterpret_cast<const char *>(temp), |
1135 |
packet->GetSize ()); |
1136 |
NS_TEST_EXPECT_MSG_EQ (msg, "hello world", "trivial"); |
1137 |
delete[] temp; |
1138 |
} |
1134 |
|
1139 |
|
1135 |
|
1140 |
|
1136 |
Ptr<const Packet> p = Create<Packet> (1000); |
1141 |
Ptr<const Packet> p = Create<Packet> (1000); |