Remove globals from message.cpp.

This commit is contained in:
Jonathan Hui
2016-09-07 13:30:22 -07:00
parent 32b6d343c4
commit e22c123904
19 changed files with 196 additions and 173 deletions
+2 -4
View File
@@ -117,7 +117,7 @@ void TestLowpanIphc(void)
frame.GetSrcAddr(macSource);
frame.GetDstAddr(macDest);
VerifyOrQuit((message = sIp6.NewMessage(0)) != NULL,
VerifyOrQuit((message = sIp6.mMessagePool.New(Message::kTypeIp6, 0)) != NULL,
"6lo: Ip6::NewMessage failed");
// ===> Test Lowpan::Decompress
@@ -154,7 +154,7 @@ void TestLowpanIphc(void)
VerifyOrQuit(memcmp(frame.GetPayload(), result, static_cast<size_t>(compressBytes)) == 0,
"6lo: Lowpan::Compress failed");
SuccessOrQuit(Message::Free(*message), "6lo: Message:Free failed");
SuccessOrQuit(message->Free(), "6lo: Message:Free failed");
printf("PASS\n\n");
}
@@ -165,8 +165,6 @@ void TestLowpanIphc(void)
int main(void)
{
Message::Init();
TestLowpanIphc();
printf("All tests passed\n");