diff --git a/src/contrib/energy/test/basic-energy-model-test.cc b/src/contrib/energy/test/basic-energy-model-test.cc index a248e82df..d06af33f3 100644 --- a/src/contrib/energy/test/basic-energy-model-test.cc +++ b/src/contrib/energy/test/basic-energy-model-test.cc @@ -132,7 +132,7 @@ BasicEnergyUpdateTest::StateSwitchTest ( Ptr devModel = DynamicCast (modelList[0]); // check pointer - NS_TEST_ASSERT_MSG_NE (NULL, devModel, "NULL pointer to device model!"); + NS_TEST_ASSERT_MSG_NE (0, devModel, "NULL pointer to device model!"); // schedule change of state Simulator::Schedule (Seconds (m_timeS), @@ -315,7 +315,7 @@ BasicEnergyDepletionTest::DepletionTestCase (double simTimeS, * the floor here because initial update is at time = 0. */ double tmp = ceil (simTimeS / updateIntervalS); - int numOfUpdates = (tmp == 0) ? 1 : tmp; + int numOfUpdates = (tmp == 0) ? 1 : static_cast (tmp); /* * Every update will trigger *all* DeviceEnergyModels to react, therefore the * total count should be numOfUpdates * m_numOfModels ^ 2