blob: cdf0c3e30feb9fe70dce6d271f9db9a3fb5f3da8 [file] [log] [blame]
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -05001/**
2 * Copyright (C) 2014 Regents of the University of Memphis.
3 * See COPYING for copyright and distribution information.
4 */
5
6#include "route/nexthop-list.hpp"
7#include "route/nexthop.hpp"
8#include <boost/test/unit_test.hpp>
9
10namespace nlsr {
11
12namespace test {
13
14BOOST_AUTO_TEST_SUITE(TestNhl)
15
16BOOST_AUTO_TEST_CASE(NhlAddNextHop)
17{
18 NextHop np1;
19
20 NexthopList nhl1;
21
22 nhl1.addNextHop(np1);
akmhoquefdbddb12014-05-02 18:35:19 -050023 BOOST_CHECK_EQUAL(nhl1.getSize(), (uint32_t)1);
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -050024
25 nhl1.removeNextHop(np1);
akmhoquefdbddb12014-05-02 18:35:19 -050026 BOOST_CHECK_EQUAL(nhl1.getSize(), (uint32_t)0);
Ashlesh Gawandeeb582eb2014-05-01 14:25:20 -050027}
28
29BOOST_AUTO_TEST_SUITE_END()
30
31} //namespace test
32} //namespace nlsr