LEFT | RIGHT |
(no file at all) | |
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) 2009 IITP RAS | 3 * Copyright (c) 2009 IITP RAS |
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 22 matching lines...) Expand all Loading... |
33 #include "ns3/internet-stack-helper.h" | 33 #include "ns3/internet-stack-helper.h" |
34 #include "ns3/ipv4-address-helper.h" | 34 #include "ns3/ipv4-address-helper.h" |
35 #include "ns3/abort.h" | 35 #include "ns3/abort.h" |
36 #include "ns3/udp-echo-helper.h" | 36 #include "ns3/udp-echo-helper.h" |
37 #include "ns3/mobility-model.h" | 37 #include "ns3/mobility-model.h" |
38 #include "ns3/pcap-file.h" | 38 #include "ns3/pcap-file.h" |
39 #include "ns3/aodv-helper.h" | 39 #include "ns3/aodv-helper.h" |
40 #include "ns3/v4ping-helper.h" | 40 #include "ns3/v4ping-helper.h" |
41 #include "ns3/nqos-wifi-mac-helper.h" | 41 #include "ns3/nqos-wifi-mac-helper.h" |
42 #include "ns3/config.h" | 42 #include "ns3/config.h" |
| 43 #include "ns3/boolean.h" |
43 #include "ns3/pcap-test.h" | 44 #include "ns3/pcap-test.h" |
44 #include "ns3/rng-seed-manager.h" | 45 #include "ns3/rng-seed-manager.h" |
45 #include <sstream> | 46 #include <sstream> |
46 | 47 |
47 using namespace ns3; | 48 using namespace ns3; |
48 using namespace aodv; | 49 using namespace aodv; |
49 //----------------------------------------------------------------------------- | 50 //----------------------------------------------------------------------------- |
50 // Test suite | 51 // Test suite |
51 //----------------------------------------------------------------------------- | 52 //----------------------------------------------------------------------------- |
52 class AodvRegressionTestSuite : public TestSuite | 53 class AodvRegressionTestSuite : public TestSuite |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 { | 91 { |
91 delete m_nodes; | 92 delete m_nodes; |
92 } | 93 } |
93 | 94 |
94 void | 95 void |
95 ChainRegressionTest::DoRun () | 96 ChainRegressionTest::DoRun () |
96 { | 97 { |
97 RngSeedManager::SetSeed (12345); | 98 RngSeedManager::SetSeed (12345); |
98 RngSeedManager::SetRun (7); | 99 RngSeedManager::SetRun (7); |
99 Config::SetDefault ("ns3::ArpCache::AliveTimeout", TimeValue (m_arpAliveTimeou
t)); | 100 Config::SetDefault ("ns3::ArpCache::AliveTimeout", TimeValue (m_arpAliveTimeou
t)); |
100 | 101 Config::SetDefault ("ns3::TcpSocketBase::Timestamp", BooleanValue (false)); |
101 CreateNodes (); | 102 CreateNodes (); |
102 CreateDevices (); | 103 CreateDevices (); |
103 | 104 |
104 // At m_time / 3 move central node away and see what will happen | 105 // At m_time / 3 move central node away and see what will happen |
105 Ptr<Node> node = m_nodes->Get (m_size / 2); | 106 Ptr<Node> node = m_nodes->Get (m_size / 2); |
106 Ptr<MobilityModel> mob = node->GetObject<MobilityModel> (); | 107 Ptr<MobilityModel> mob = node->GetObject<MobilityModel> (); |
107 Simulator::Schedule (Time (m_time / 3), &MobilityModel::SetPosition, mob, Vect
or (1e5, 1e5, 1e5)); | 108 Simulator::Schedule (Time (m_time / 3), &MobilityModel::SetPosition, mob, Vect
or (1e5, 1e5, 1e5)); |
108 | 109 |
109 Simulator::Stop (m_time); | 110 Simulator::Stop (m_time); |
110 Simulator::Run (); | 111 Simulator::Run (); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 } | 186 } |
186 | 187 |
187 void | 188 void |
188 ChainRegressionTest::CheckResults () | 189 ChainRegressionTest::CheckResults () |
189 { | 190 { |
190 for (uint32_t i = 0; i < m_size; ++i) | 191 for (uint32_t i = 0; i < m_size; ++i) |
191 { | 192 { |
192 NS_PCAP_TEST_EXPECT_EQ (m_prefix << "-" << i << "-0.pcap"); | 193 NS_PCAP_TEST_EXPECT_EQ (m_prefix << "-" << i << "-0.pcap"); |
193 } | 194 } |
194 } | 195 } |
LEFT | RIGHT |