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) 2014 Universita' di Firenze | 3 * Copyright (c) 2014 Universita' di Firenze |
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 PacketSocketAppsTest::PacketSocketAppsTest () | 58 PacketSocketAppsTest::PacketSocketAppsTest () |
59 : TestCase ("Packet Socket Apps test") | 59 : TestCase ("Packet Socket Apps test") |
60 { | 60 { |
61 m_receivedPacketSize = 0; | 61 m_receivedPacketSize = 0; |
62 m_receivedPacketNumber = 0; | 62 m_receivedPacketNumber = 0; |
63 } | 63 } |
64 | 64 |
65 void PacketSocketAppsTest::ReceivePkt (Ptr<const Packet> packet, const Address &
from) | 65 void PacketSocketAppsTest::ReceivePkt (Ptr<const Packet> packet, const Address &
from) |
66 { | 66 { |
| 67 NS_UNUSED (from); |
67 if (packet) | 68 if (packet) |
68 { | 69 { |
69 m_receivedPacketSize = packet->GetSize (); | 70 m_receivedPacketSize = packet->GetSize (); |
70 m_receivedPacketNumber++; | 71 m_receivedPacketNumber++; |
71 } | 72 } |
72 } | 73 } |
73 | 74 |
74 | 75 |
75 void | 76 void |
76 PacketSocketAppsTest::DoRun (void) | 77 PacketSocketAppsTest::DoRun (void) |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 class PacketSocketAppsTestSuite : public TestSuite | 135 class PacketSocketAppsTestSuite : public TestSuite |
135 { | 136 { |
136 public: | 137 public: |
137 PacketSocketAppsTestSuite () : TestSuite ("packet-socket-apps", UNIT) | 138 PacketSocketAppsTestSuite () : TestSuite ("packet-socket-apps", UNIT) |
138 { | 139 { |
139 AddTestCase (new PacketSocketAppsTest, TestCase::QUICK); | 140 AddTestCase (new PacketSocketAppsTest, TestCase::QUICK); |
140 } | 141 } |
141 }; | 142 }; |
142 | 143 |
143 static PacketSocketAppsTestSuite g_packetSocketAppsTestSuite; //!< Static variab
le for test initialization | 144 static PacketSocketAppsTestSuite g_packetSocketAppsTestSuite; //!< Static variab
le for test initialization |
OLD | NEW |