Ashlesh Gawande | eb582eb | 2014-05-01 14:25:20 -0500 | [diff] [blame] | 1 | /** |
| 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 | |
| 10 | namespace nlsr { |
| 11 | |
| 12 | namespace test { |
| 13 | |
| 14 | BOOST_AUTO_TEST_SUITE(TestNhl) |
| 15 | |
| 16 | BOOST_AUTO_TEST_CASE(NhlAddNextHop) |
| 17 | { |
| 18 | NextHop np1; |
| 19 | |
| 20 | NexthopList nhl1; |
| 21 | |
| 22 | nhl1.addNextHop(np1); |
akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame^] | 23 | BOOST_CHECK_EQUAL(nhl1.getSize(), (uint32_t)1); |
Ashlesh Gawande | eb582eb | 2014-05-01 14:25:20 -0500 | [diff] [blame] | 24 | |
| 25 | nhl1.removeNextHop(np1); |
akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame^] | 26 | BOOST_CHECK_EQUAL(nhl1.getSize(), (uint32_t)0); |
Ashlesh Gawande | eb582eb | 2014-05-01 14:25:20 -0500 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | BOOST_AUTO_TEST_SUITE_END() |
| 30 | |
| 31 | } //namespace test |
| 32 | } //namespace nlsr |