Files
NLSR/tests/test-nexthop.cpp
T
akmhoque fdbddb114e src: Renaming class to spell out them (Adl, Nhl, Npl, Npt, Npte)
Refs: #1534

Change-Id: If4a205e8ad2419505cc796027a5c863471ef5439
2014-05-02 23:40:42 -07:00

31 lines
563 B
C++

/**
* Copyright (C) 2014 Regents of the University of Memphis.
* See COPYING for copyright and distribution information.
*/
#include "route/nexthop.hpp"
#include <boost/test/unit_test.hpp>
namespace nlsr {
namespace test {
BOOST_AUTO_TEST_SUITE(TestNexthop)
BOOST_AUTO_TEST_CASE(NexthopSetAndGet)
{
NextHop np1;
np1.setConnectingFace(1);
np1.setRouteCost(10.5);
BOOST_CHECK_EQUAL(np1.getConnectingFace(), (uint32_t)1);
BOOST_CHECK_CLOSE(np1.getRouteCost(), 10.5, 0.0001);
}
BOOST_AUTO_TEST_SUITE_END()
} //namespace test
} //namespace nlsr