20 #include "ns3/abort.h"
22 #include "ns3/config.h"
23 #include "ns3/buildings-channel-condition-model.h"
24 #include "ns3/constant-position-mobility-model.h"
25 #include "ns3/buildings-module.h"
27 #include "ns3/simulator.h"
58 virtual void DoRun (
void);
74 :
TestCase (
"Test case for the BuildingsChannelConditionModel"), m_testVectors ()
89 testVector.
m_losCond = ChannelCondition::LosConditionValue::NLOS;
94 testVector.
m_losCond = ChannelCondition::LosConditionValue::LOS;
99 testVector.
m_losCond = ChannelCondition::LosConditionValue::NLOS;
104 testVector.
m_losCond = ChannelCondition::LosConditionValue::LOS;
112 nodes.Get (0)->AggregateObject (a);
115 nodes.Get (1)->AggregateObject (b);
120 building->SetNRoomsX (1);
121 building->SetNRoomsY (1);
122 building->SetNFloors (1);
123 building->SetBoundaries (
Box (0.0, 10.0, 0.0, 10.0, 0.0, 5.0));
125 BuildingsHelper::Install (
nodes);
133 buildingInfoA->MakeConsistent (a);
135 buildingInfoA->MakeConsistent (b);
142 Simulator::Destroy ();
157 :
TestSuite (
"buildings-channel-condition-model", UNIT)
static BuildingsChannelConditionModelsTestSuite BuildingsChannelConditionModelsTestSuite
Static variable for test initialization.
Test case for the class BuildingsChannelConditionModel.
virtual void DoRun(void)
Builds the simulation scenario and perform the tests.
BuildingsChannelConditionModelTestCase()
Constructor.
TestVectors< TestVector > m_testVectors
array containg all the test vectors
virtual ~BuildingsChannelConditionModelTestCase()
Destructor.
Test suite for the buildings channel condition model.
BuildingsChannelConditionModelsTestSuite()
LosConditionValue
Possible values for Line-of-Sight condition.
mobility buildings information (to be used by mobility models)
void SetPosition(const Vector &position)
keep track of a set of node pointers.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
A simple way to store test vectors (for stimulus or from responses)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Struct containing the parameters for each test.
Vector m_positionB
the position of the second node
ChannelCondition::LosConditionValue m_losCond
the correct channel condition
Vector m_positionA
the position of the first node