diff --git a/src/aodv/model/aodv-routing-protocol.cc b/src/aodv/model/aodv-routing-protocol.cc index 4376d3d18..106f81205 100644 --- a/src/aodv/model/aodv-routing-protocol.cc +++ b/src/aodv/model/aodv-routing-protocol.cc @@ -1397,7 +1397,6 @@ RoutingProtocol::RecvError (Ptr p, Ipv4Address src ) { if (i->first == un.first) { - Ipv4Address dst = un.first; unreachable.insert (un); } } diff --git a/src/aodv/model/aodv-rqueue.cc b/src/aodv/model/aodv-rqueue.cc index 93bf05da9..bc3c742b3 100644 --- a/src/aodv/model/aodv-rqueue.cc +++ b/src/aodv/model/aodv-rqueue.cc @@ -72,7 +72,6 @@ RequestQueue::DropPacketWithDst (Ipv4Address dst) { NS_LOG_FUNCTION (this << dst); Purge (); - const Ipv4Address addr = dst; for (std::vector::iterator i = m_queue.begin (); i != m_queue.end (); ++i) { diff --git a/src/core/model/map-scheduler.cc b/src/core/model/map-scheduler.cc index 6aebde981..3eb4776a6 100644 --- a/src/core/model/map-scheduler.cc +++ b/src/core/model/map-scheduler.cc @@ -82,7 +82,6 @@ MapScheduler::RemoveNext (void) NS_LOG_FUNCTION (this); EventMapI i = m_list.begin (); NS_ASSERT (i != m_list.end ()); - std::pair next = *i; Event ev; ev.impl = i->second; ev.key = i->first; diff --git a/src/dsdv/model/dsdv-packet-queue.cc b/src/dsdv/model/dsdv-packet-queue.cc index ebb73f327..33ff44f22 100644 --- a/src/dsdv/model/dsdv-packet-queue.cc +++ b/src/dsdv/model/dsdv-packet-queue.cc @@ -84,7 +84,6 @@ PacketQueue::DropPacketWithDst (Ipv4Address dst) { NS_LOG_FUNCTION ("Dropping packet to " << dst); Purge (); - const Ipv4Address addr = dst; for (std::vector::iterator i = m_queue.begin (); i != m_queue.end (); ++i) { diff --git a/src/energy/test/basic-energy-model-test.cc b/src/energy/test/basic-energy-model-test.cc index 3a7aefd3e..3656c7717 100644 --- a/src/energy/test/basic-energy-model-test.cc +++ b/src/energy/test/basic-energy-model-test.cc @@ -334,7 +334,6 @@ BasicEnergyDepletionTest::DepletionTestCase (double simTimeS, // set energy to 0 so that we deplete energy at the beginning of simulation basicSourceHelper.Set ("BasicEnergySourceInitialEnergyJ", DoubleValue (0.0)); // set update interval - Time updateInterval = Seconds (1.0); basicSourceHelper.Set ("PeriodicEnergyUpdateInterval", TimeValue (Seconds (updateIntervalS))); // install source diff --git a/src/internet/model/icmpv4.cc b/src/internet/model/icmpv4.cc index a615a4680..3b437520d 100644 --- a/src/internet/model/icmpv4.cc +++ b/src/internet/model/icmpv4.cc @@ -82,8 +82,7 @@ Icmpv4Header::Deserialize (Buffer::Iterator start) { m_type = start.ReadU8 (); m_code = start.ReadU8 (); - uint16_t checksum; - checksum = start.ReadNtohU16 (); + start.Next (2); // uint16_t checksum = start.ReadNtohU16 (); return 4; } void diff --git a/src/internet/model/icmpv6-header.cc b/src/internet/model/icmpv6-header.cc index 46bd06ef1..54ab4b126 100644 --- a/src/internet/model/icmpv6-header.cc +++ b/src/internet/model/icmpv6-header.cc @@ -1368,13 +1368,11 @@ uint32_t Icmpv6OptionHeader::GetSerializedSize () const uint32_t Icmpv6OptionHeader::Deserialize (Buffer::Iterator start) { - Buffer::Iterator i = start; return GetSerializedSize (); } void Icmpv6OptionHeader::Serialize (Buffer::Iterator start) const { - Buffer::Iterator i = start; } NS_OBJECT_ENSURE_REGISTERED (Icmpv6OptionMtu); diff --git a/src/internet/model/ipv4-static-routing.cc b/src/internet/model/ipv4-static-routing.cc index c9cef63cf..e3f865966 100644 --- a/src/internet/model/ipv4-static-routing.cc +++ b/src/internet/model/ipv4-static-routing.cc @@ -371,7 +371,6 @@ Ipv4StaticRouting::GetDefaultRoute () uint32_t metric = i->second; Ipv4Mask mask = (j)->GetDestNetworkMask (); uint16_t masklen = mask.GetPrefixLength (); - Ipv4Address entry = (j)->GetDestNetwork (); if (masklen != 0) { continue; diff --git a/src/internet/model/rtt-estimator.cc b/src/internet/model/rtt-estimator.cc index c8c8e2601..fefa2bf16 100644 --- a/src/internet/model/rtt-estimator.cc +++ b/src/internet/model/rtt-estimator.cc @@ -170,10 +170,6 @@ void RttEstimator::ClearSent () void RttEstimator::IncreaseMultiplier () { - double a; - a = multiplier * 2.0; - double b; - b = m_maxMultiplier * 2.0; multiplier = std::min (multiplier * 2.0, m_maxMultiplier); } diff --git a/src/mesh/model/dot11s/hwmp-protocol-mac.cc b/src/mesh/model/dot11s/hwmp-protocol-mac.cc index 0f88091d8..9e4772ba2 100644 --- a/src/mesh/model/dot11s/hwmp-protocol-mac.cc +++ b/src/mesh/model/dot11s/hwmp-protocol-mac.cc @@ -97,7 +97,6 @@ HwmpProtocolMac::ReceiveAction (Ptr packet, const WifiMacHeader & header m_stats.rxMgtBytes += packet->GetSize (); WifiActionHeader actionHdr; packet->RemoveHeader (actionHdr); - WifiActionHeader::ActionValue actionValue = actionHdr.GetAction (); if (actionHdr.GetCategory () != WifiActionHeader::MESH_PATH_SELECTION) { return true; diff --git a/src/mesh/model/dot11s/ie-dot11s-configuration.cc b/src/mesh/model/dot11s/ie-dot11s-configuration.cc index 12b60d322..12143a353 100644 --- a/src/mesh/model/dot11s/ie-dot11s-configuration.cc +++ b/src/mesh/model/dot11s/ie-dot11s-configuration.cc @@ -139,6 +139,10 @@ IeConfiguration::DeserializeInformationField (Buffer::Iterator i, uint8_t length Buffer::Iterator start = i; uint8_t version; version = i.ReadU8 (); + if (version != 1) + { + NS_FATAL_ERROR ("Other versions not supported yet"); + } // Active Path Selection Protocol ID: m_APSPId = (dot11sPathSelectionProtocol) i.ReadLsbtohU32 (); // Active Path Metric ID: diff --git a/src/mesh/model/dot11s/peer-management-protocol-mac.cc b/src/mesh/model/dot11s/peer-management-protocol-mac.cc index d8a13c190..6924411fb 100644 --- a/src/mesh/model/dot11s/peer-management-protocol-mac.cc +++ b/src/mesh/model/dot11s/peer-management-protocol-mac.cc @@ -158,7 +158,6 @@ PeerManagementProtocolMac::UpdateOutcomingFrame (Ptr packet, WifiMacHead { WifiActionHeader actionHdr; packet->PeekHeader (actionHdr); - WifiActionHeader::ActionValue actionValue = actionHdr.GetAction (); if (actionHdr.GetCategory () == WifiActionHeader::MESH_PEERING_MGT) { return true; diff --git a/src/mesh/model/mesh-wifi-interface-mac.cc b/src/mesh/model/mesh-wifi-interface-mac.cc index 220e803a8..4512c33bc 100644 --- a/src/mesh/model/mesh-wifi-interface-mac.cc +++ b/src/mesh/model/mesh-wifi-interface-mac.cc @@ -405,7 +405,6 @@ MeshWifiInterfaceMac::Receive (Ptr packet, WifiMacHeader const *hdr) { m_stats.recvBeacons++; MgtBeaconHeader beacon_hdr; - Mac48Address from = hdr->GetAddr2 (); packet->PeekHeader (beacon_hdr); diff --git a/src/mobility/helper/ns2-mobility-helper.cc b/src/mobility/helper/ns2-mobility-helper.cc index 9153bbaf9..9fe514426 100644 --- a/src/mobility/helper/ns2-mobility-helper.cc +++ b/src/mobility/helper/ns2-mobility-helper.cc @@ -399,8 +399,7 @@ bool IsNumber (const string& s) { char *endp; - double unused; - unused = strtod (s.c_str (), &endp); // declared with warn_unused_result + (void) strtod (s.c_str (), &endp); // declared with warn_unused_result return endp == s.c_str () + s.size (); } diff --git a/src/network/model/buffer.cc b/src/network/model/buffer.cc index b7dfff78e..fc87433c6 100644 --- a/src/network/model/buffer.cc +++ b/src/network/model/buffer.cc @@ -843,7 +843,6 @@ Buffer::Iterator::Write (Iterator start, Iterator end) NS_ASSERT (start.m_zeroEnd == end.m_zeroEnd); NS_ASSERT (m_data != start.m_data); uint32_t size = end.m_current - start.m_current; - Iterator cur = start; NS_ASSERT_MSG (CheckNoZero (m_current, m_current + size), GetWriteErrorMessage ()); if (start.m_current <= start.m_zeroStart) diff --git a/src/network/test/packet-metadata-test.cc b/src/network/test/packet-metadata-test.cc index f4bad780e..ef18a8a99 100644 --- a/src/network/test/packet-metadata-test.cc +++ b/src/network/test/packet-metadata-test.cc @@ -784,6 +784,8 @@ PacketMetadataTest::DoRun (void) p1 = p->CreateFragment (0,6); p2 = p->CreateFragment (6,535-6); p1->AddAtEnd(p2); + + NS_TEST_EXPECT_MSG_EQ(result, true, "PacketMetadataTest failed"); } //----------------------------------------------------------------------------- class PacketMetadataTestSuite : public TestSuite diff --git a/src/nix-vector-routing/examples/nms-p2p-nix.cc b/src/nix-vector-routing/examples/nms-p2p-nix.cc index e4034f02e..b51215652 100644 --- a/src/nix-vector-routing/examples/nms-p2p-nix.cc +++ b/src/nix-vector-routing/examples/nms-p2p-nix.cc @@ -60,7 +60,6 @@ NS_LOG_COMPONENT_DEFINE ("CampusNetworkModel"); void Progress () { - Time now = Simulator::Now (); Simulator::Schedule (Seconds (0.1), Progress); } diff --git a/src/point-to-point/model/point-to-point-remote-channel.cc b/src/point-to-point/model/point-to-point-remote-channel.cc index 42a50c1e9..0279d81ae 100644 --- a/src/point-to-point/model/point-to-point-remote-channel.cc +++ b/src/point-to-point/model/point-to-point-remote-channel.cc @@ -67,9 +67,9 @@ PointToPointRemoteChannel::TransmitStart ( uint32_t wire = src == GetSource (0) ? 0 : 1; Ptr dst = GetDestination (wire); +#ifdef NS3_MPI // Calculate the rxTime (absolute) Time rxTime = Simulator::Now () + txTime + GetDelay (); -#ifdef NS3_MPI MpiInterface::SendPacket (p, rxTime, dst->GetNode ()->GetId (), dst->GetIfIndex ()); #else NS_FATAL_ERROR ("Can't use distributed simulator without MPI compiled in"); diff --git a/src/spectrum/test/spectrum-value-test.cc b/src/spectrum/test/spectrum-value-test.cc index 0c98e99f1..55db374e2 100644 --- a/src/spectrum/test/spectrum-value-test.cc +++ b/src/spectrum/test/spectrum-value-test.cc @@ -118,7 +118,6 @@ SpectrumValueTestSuite::SpectrumValueTestSuite () Ptr f = Create (freqs); SpectrumValue v1 (f), v2 (f), v3 (f), v4 (f), v5 (f), v6 (f), v7 (f), v8 (f), v9 (f), v10 (f); - double nv1, nv2; double doubleValue; @@ -185,16 +184,6 @@ SpectrumValueTestSuite::SpectrumValueTestSuite () v10[3] = -0.794244913190; v10[4] = 0.878579343459; - nv1 = 1.76957619675970; - nv2 = 1.68451062071783; - - - - - // std::cerr.precision(15); - - // std::cerr<< nv1 << " "<< v1.Norm() << std::endl; - SpectrumValue tv3 (f), tv4 (f), tv5 (f), tv6 (f); tv3 = v1 + v2; diff --git a/src/topology-read/model/rocketfuel-topology-reader.cc b/src/topology-read/model/rocketfuel-topology-reader.cc index 6a4896dbf..5cd04af6d 100644 --- a/src/topology-read/model/rocketfuel-topology-reader.cc +++ b/src/topology-read/model/rocketfuel-topology-reader.cc @@ -86,8 +86,8 @@ RocketfuelTopologyReader::GenerateFromMapsFile (int argc, char *argv[]) std::string nuid; bool dns = false; bool bb = false; - int num_neigh = 0; - int ext_conn = 0; + int num_neigh_s = 0; + unsigned int num_neigh = 0; int radius = 0; std::vector neigh_list; NodeContainer nodes; @@ -101,12 +101,15 @@ RocketfuelTopologyReader::GenerateFromMapsFile (int argc, char *argv[]) if (argv[3]) bb = true; - num_neigh = ::atoi (argv[4]); - - /* the first char should be '&' */ - if (argv[5]) + num_neigh_s = ::atoi (argv[4]); + if (num_neigh_s < 0) { - ext_conn = ::atoi (&argv[5][1]); + num_neigh = 0; + NS_LOG_WARN ("Negative number of neighbors given"); + } + else + { + num_neigh = num_neigh_s; } /* neighbors */ @@ -120,6 +123,10 @@ RocketfuelTopologyReader::GenerateFromMapsFile (int argc, char *argv[]) neigh_list.push_back (nbr + 1); } } + if (num_neigh != neigh_list.size ()) + { + NS_LOG_WARN ("Given number of neighbors = " << num_neigh << " != size of neighbors list = " << neigh_list.size ()); + } /* externs */ if (argv[7]) @@ -187,13 +194,12 @@ RocketfuelTopologyReader::GenerateFromWeightsFile (int argc, char *argv[]) /* uid @loc [+] [bb] (num_neigh) [&ext] -> ... {-euid} ... =name[!] rn */ std::string sname; std::string tname; - double weight; char *endptr; NodeContainer nodes; sname = argv[0]; tname = argv[1]; - weight = strtod (argv[2], &endptr); + (void) strtod (argv[2], &endptr); // weight if (*endptr != '\0') { NS_LOG_WARN ("invalid weight: " << argv[2]); diff --git a/src/uan/model/uan-phy-gen.cc b/src/uan/model/uan-phy-gen.cc index 2ac9bb2d2..b48330fba 100644 --- a/src/uan/model/uan-phy-gen.cc +++ b/src/uan/model/uan-phy-gen.cc @@ -139,8 +139,6 @@ UanPhyCalcSinrFhFsk::CalcSinrDb (Ptr pkt, double clearingTime = (m_hops - 1.0) * ts; double csp = pdp.SumTapsFromMaxNc (Seconds (0), Seconds (ts)); - UanPdp::Iterator tmpIt = pdp.GetBegin (); - // Get maximum arrival offset double maxAmp = -1; double maxTapDelay = 0.0; diff --git a/src/uan/test/uan-test.cc b/src/uan/test/uan-test.cc index c8e9433cd..e47241b30 100644 --- a/src/uan/test/uan-test.cc +++ b/src/uan/test/uan-test.cc @@ -245,8 +245,7 @@ UanTest::DoRun (void) #endif // UAN_PROP_BH_INSTALLED - bool phyTestsError; - phyTestsError = DoPhyTests (); + DoPhyTests (); } diff --git a/src/wifi/model/dcf-manager.cc b/src/wifi/model/dcf-manager.cc index 87cd253b0..fea94038b 100644 --- a/src/wifi/model/dcf-manager.cc +++ b/src/wifi/model/dcf-manager.cc @@ -390,8 +390,6 @@ DcfManager::RequestAccess (DcfState *state) void DcfManager::DoGrantAccess (void) { - Time accessGrantStart = GetAccessGrantStart (); - uint32_t k = 0; for (States::const_iterator i = m_states.begin (); i != m_states.end (); k++) { diff --git a/src/wifi/model/wifi-net-device.cc b/src/wifi/model/wifi-net-device.cc index d6c43d8b4..0026b6d82 100644 --- a/src/wifi/model/wifi-net-device.cc +++ b/src/wifi/model/wifi-net-device.cc @@ -253,7 +253,6 @@ WifiNetDevice::Send (Ptr packet, const Address& dest, uint16_t protocolN NS_ASSERT (Mac48Address::IsMatchingType (dest)); Mac48Address realTo = Mac48Address::ConvertFrom (dest); - Mac48Address realFrom = Mac48Address::ConvertFrom (GetAddress ()); LlcSnapHeader llc; llc.SetType (protocolNumber); diff --git a/src/wifi/test/wifi-test.cc b/src/wifi/test/wifi-test.cc index 1c14807af..8486e8309 100644 --- a/src/wifi/test/wifi-test.cc +++ b/src/wifi/test/wifi-test.cc @@ -207,7 +207,6 @@ InterferenceHelperSequenceTest::SendOnePacket (Ptr dev) void InterferenceHelperSequenceTest::SwitchCh (Ptr dev) { - Time now = Simulator::Now(); Ptr p = dev->GetPhy (); p->SetChannelNumber (1); } diff --git a/src/wimax/model/bs-scheduler-rtps.cc b/src/wimax/model/bs-scheduler-rtps.cc index ff9a54c27..f516ac674 100644 --- a/src/wimax/model/bs-scheduler-rtps.cc +++ b/src/wimax/model/bs-scheduler-rtps.cc @@ -627,13 +627,11 @@ BSSchedulerRtps::BSSchedulerNRTPSConnection (uint32_t &availableSymbols) Ptr burst = Create (); std::vector::iterator iter; - ServiceFlowRecord *serviceFlowRecord; std::vector serviceFlows; serviceFlows = GetBs ()->GetServiceFlowManager ()->GetServiceFlows (ServiceFlow::SF_TYPE_NRTPS); for (iter = serviceFlows.begin (); iter != serviceFlows.end (); ++iter) { - serviceFlowRecord = (*iter)->GetRecord (); connection = (*iter)->GetConnection (); while ((*iter)->HasPackets () && availableSymbols > 0) @@ -684,13 +682,11 @@ BSSchedulerRtps::BSSchedulerBEConnection (uint32_t &availableSymbols) Ptr burst = Create (); std::vector::iterator iter; - ServiceFlowRecord *serviceFlowRecord; std::vector serviceFlows; serviceFlows = GetBs ()->GetServiceFlowManager ()->GetServiceFlows (ServiceFlow::SF_TYPE_BE); for (iter = serviceFlows.begin (); iter != serviceFlows.end (); ++iter) { - serviceFlowRecord = (*iter)->GetRecord (); connection = (*iter)->GetConnection (); while ((*iter)->HasPackets () && availableSymbols > 0) diff --git a/src/wimax/model/bs-uplink-scheduler-mbqos.cc b/src/wimax/model/bs-uplink-scheduler-mbqos.cc index 24450eda1..47895664f 100644 --- a/src/wimax/model/bs-uplink-scheduler-mbqos.cc +++ b/src/wimax/model/bs-uplink-scheduler-mbqos.cc @@ -310,9 +310,6 @@ UplinkSchedulerMBQoS::Schedule (void) timestamp = (*(ssRecord->GetServiceFlows (ServiceFlow::SF_TYPE_UGS).begin ()))->GetRecord ()->GetLastGrantTime () + MilliSeconds ((*(ssRecord->GetServiceFlows (ServiceFlow::SF_TYPE_UGS).begin ()))->GetUnsolicitedGrantInterval ()); - Time - uInterval = - MilliSeconds ((*(ssRecord->GetServiceFlows (ServiceFlow::SF_TYPE_UGS).begin ()))->GetUnsolicitedGrantInterval ()); Time frame = Time ((timestamp - Simulator::Now ()) / frame_duration); @@ -500,10 +497,8 @@ bool UplinkSchedulerMBQoS::ServiceBandwidthRequestsBytes (ServiceFlow *serviceFl { uint32_t allocSizeBytes = allocationSizeBytes; uint32_t allocSizeSymbols = 0; - uint16_t sduSize = 0; ServiceFlowRecord *record = serviceFlow->GetRecord (); - sduSize = serviceFlow->GetSduSize (); uint32_t requiredBandwidth = record->GetRequestedBandwidth (); @@ -656,7 +651,6 @@ UplinkSchedulerMBQoS::CheckDeadline (uint32_t &availableSymbols) if (m_uplinkJobs_inter.size () > 0) { std::list >::iterator iter = m_uplinkJobs_inter.begin (); - std::list >::iterator iterPrev = m_uplinkJobs_inter.begin (); while (iter != m_uplinkJobs_inter.end () && availableSymbols) { diff --git a/src/wimax/model/ss-link-manager.cc b/src/wimax/model/ss-link-manager.cc index e0ac6e9af..8b3033fe5 100644 --- a/src/wimax/model/ss-link-manager.cc +++ b/src/wimax/model/ss-link-manager.cc @@ -438,6 +438,7 @@ SSLinkManager::IsUlChannelUsable (void) void SSLinkManager::AdjustRangingParameters (const RngRsp &rngrsp) { +#if 0 /* a template for future implementation following */ bool successful = true; uint8_t temp = rngrsp.GetTimingAdjust (); temp = rngrsp.GetPowerLevelAdjust (); @@ -449,6 +450,7 @@ SSLinkManager::AdjustRangingParameters (const RngRsp &rngrsp) { // code for setting ranging anomalies goes here } +#endif } void diff --git a/src/wimax/model/ss-net-device.cc b/src/wimax/model/ss-net-device.cc index cf6571cc2..5bd4ca971 100644 --- a/src/wimax/model/ss-net-device.cc +++ b/src/wimax/model/ss-net-device.cc @@ -1081,9 +1081,11 @@ SubscriberStationNetDevice::ProcessDlMap (const DlMap &dlmap) mechanism automatically passes it as parameter.*/ } +#if 0 /* a template for future implementation following */ uint8_t temp = iter->GetDiuc (); temp = iter->GetPreamblePresent (); temp = iter->GetStartTime (); +#endif } } diff --git a/src/wimax/model/ss-scheduler.cc b/src/wimax/model/ss-scheduler.cc index 00d64542d..8dcee937a 100644 --- a/src/wimax/model/ss-scheduler.cc +++ b/src/wimax/model/ss-scheduler.cc @@ -85,12 +85,10 @@ SSScheduler::Schedule (uint16_t availableSymbols, } Ptr packet; - ServiceFlow *serviceFlow; while (connection && connection->HasPackets (packetType)) { NS_LOG_INFO ("FRAG_DEBUG: SS Scheduler" << std::endl); - serviceFlow = connection->GetServiceFlow (); uint32_t availableByte = m_ss->GetPhy ()-> GetNrBytes (availableSymbols, modulationType); diff --git a/src/wimax/test/wimax-fragmentation-test.cc b/src/wimax/test/wimax-fragmentation-test.cc index 0c7736a81..322756c40 100644 --- a/src/wimax/test/wimax-fragmentation-test.cc +++ b/src/wimax/test/wimax-fragmentation-test.cc @@ -76,7 +76,6 @@ Ns3WimaxFragmentationTestCase::DoRun (void) Cid cid; WimaxConnection *connectionTx = new WimaxConnection (cid, Cid::TRANSPORT); WimaxConnection *connectionRx = new WimaxConnection (cid, Cid::TRANSPORT); - bool testResult = false; // A Packet of 1000 bytes has been created. // It will be fragmentated into 4 fragments and then defragmentated into fullPacket. @@ -111,39 +110,16 @@ Ns3WimaxFragmentationTestCase::DoRun (void) if (type) { // Check if there is a fragmentation Subheader - uint8_t tmpType = type; - if (((tmpType >> 2) & 1) != 1) - { - // The packet is not a fragment - testResult = true; - break; - } + NS_TEST_EXPECT_MSG_EQ (((type >> 2) & 1), 1, "The packet is not a fragment"); } // remove header from the received fragment fragment->RemoveHeader (fragSubhdr); uint32_t fc = fragSubhdr.GetFc (); - - if (fc == 1 && i != 0) - { - // the fragment in not the first one - testResult = true; - break; - } - if (fc == 2 && i != 3) - { - // the fragment in not the latest one - testResult = true; - break; - } - if ((fc == 3 && i != 1) && (fc == 3 && i != 2)) - { - // the fragment in not the middle one - testResult = true; - break; - } - + NS_TEST_EXPECT_MSG_EQ ((fc == 1 && i != 0), false, "The fragment in not the first one"); + NS_TEST_EXPECT_MSG_EQ ((fc == 2 && i != 3), false, "The fragment in not the latest one"); + NS_TEST_EXPECT_MSG_EQ (((fc == 3 && i != 1) && (fc == 3 && i != 2)), false, "The fragment in not the middle one"); if (fc != 2) { @@ -167,12 +143,7 @@ Ns3WimaxFragmentationTestCase::DoRun (void) } connectionRx->ClearFragmentsQueue (); - if (fullPacket->GetSize () != 1000) - { - // The defragmentation is correct. - testResult = true; // Test is passed - break; - } + NS_TEST_EXPECT_MSG_EQ (fullPacket->GetSize (), 1000, "The defragmentation is incorrect"); } } delete connectionTx;