|
1110 |
|
1110 |
|
1111 |
NS_TEST_EXPECT_MSG_EQ (packet->GetSize (), 11, "trivial"); |
1111 |
NS_TEST_EXPECT_MSG_EQ (packet->GetSize (), 11, "trivial"); |
1112 |
|
1112 |
|
1113 |
std::string msg = std::string (reinterpret_cast<const char *>(packet->PeekData ()), |
1113 |
{ |
1114 |
packet->GetSize ()); |
1114 |
uint8_t *temp = new uint8_t[packet->GetSize ()]; |
1115 |
NS_TEST_EXPECT_MSG_EQ (msg, "hello world", "trivial"); |
1115 |
packet->CopyData (temp, packet->GetSize ()); |
1116 |
|
1116 |
std::string msg = std::string (reinterpret_cast<const char *>(temp), |
|
|
1117 |
packet->GetSize ()); |
1118 |
NS_TEST_EXPECT_MSG_EQ (msg, "hello world", "trivial"); |
1119 |
delete[] temp; |
1120 |
} |
1117 |
|
1121 |
|
1118 |
Ptr<const Packet> p = Create<Packet> (1000); |
1122 |
Ptr<const Packet> p = Create<Packet> (1000); |
1119 |
|
1123 |
|