OLD | NEW |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2013 Universita' di Firenze, Italy | 3 * Copyright (c) 2013 Universita' di Firenze, Italy |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 void ReceivePkt (Ptr<Socket> socket); | 85 void ReceivePkt (Ptr<Socket> socket); |
86 }; | 86 }; |
87 | 87 |
88 SixlowpanHc1ImplTest::SixlowpanHc1ImplTest () | 88 SixlowpanHc1ImplTest::SixlowpanHc1ImplTest () |
89 : TestCase ("Sixlowpan implementation") | 89 : TestCase ("Sixlowpan implementation") |
90 { | 90 { |
91 } | 91 } |
92 | 92 |
93 void SixlowpanHc1ImplTest::ReceivePacket (Ptr<Socket> socket, Ptr<Packet> packet
, const Address &from) | 93 void SixlowpanHc1ImplTest::ReceivePacket (Ptr<Socket> socket, Ptr<Packet> packet
, const Address &from) |
94 { | 94 { |
| 95 NS_UNUSED (from); |
95 m_receivedPacket = packet; | 96 m_receivedPacket = packet; |
96 } | 97 } |
97 | 98 |
98 void SixlowpanHc1ImplTest::ReceivePkt (Ptr<Socket> socket) | 99 void SixlowpanHc1ImplTest::ReceivePkt (Ptr<Socket> socket) |
99 { | 100 { |
100 uint32_t availableData; | 101 uint32_t availableData; |
101 availableData = socket->GetRxAvailable (); | 102 availableData = socket->GetRxAvailable (); |
102 m_receivedPacket = socket->Recv (std::numeric_limits<uint32_t>::max (), 0); | 103 m_receivedPacket = socket->Recv (std::numeric_limits<uint32_t>::max (), 0); |
103 NS_ASSERT (availableData == m_receivedPacket->GetSize ()); | 104 NS_ASSERT (availableData == m_receivedPacket->GetSize ()); |
104 //cast availableData to void, to suppress 'availableData' set but not used | 105 //cast availableData to void, to suppress 'availableData' set but not used |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 private: | 224 private: |
224 }; | 225 }; |
225 | 226 |
226 SixlowpanHc1TestSuite::SixlowpanHc1TestSuite () | 227 SixlowpanHc1TestSuite::SixlowpanHc1TestSuite () |
227 : TestSuite ("sixlowpan-hc1", UNIT) | 228 : TestSuite ("sixlowpan-hc1", UNIT) |
228 { | 229 { |
229 AddTestCase (new SixlowpanHc1ImplTest (), TestCase::QUICK); | 230 AddTestCase (new SixlowpanHc1ImplTest (), TestCase::QUICK); |
230 } | 231 } |
231 | 232 |
232 static SixlowpanHc1TestSuite g_sixlowpanHc1TestSuite; //!< Static variable for t
est initialization | 233 static SixlowpanHc1TestSuite g_sixlowpanHc1TestSuite; //!< Static variable for t
est initialization |
OLD | NEW |