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/routing-table.hpp" |
| 7 | #include "route/routing-table-entry.hpp" |
| 8 | #include "route/nexthop.hpp" |
| 9 | #include <boost/test/unit_test.hpp> |
| 10 | |
| 11 | namespace nlsr { |
| 12 | |
| 13 | namespace test { |
| 14 | |
| 15 | BOOST_AUTO_TEST_SUITE(TestRoutingTable) |
| 16 | |
| 17 | BOOST_AUTO_TEST_CASE(RoutingTableAddNextHop) |
| 18 | { |
| 19 | RoutingTable rt1; |
| 20 | |
| 21 | NextHop nh1; |
| 22 | |
| 23 | const std::string DEST_ROUTER = "destRouter"; |
| 24 | |
| 25 | rt1.addNextHop("destRouter", nh1); |
| 26 | |
| 27 | BOOST_CHECK_EQUAL(rt1.findRoutingTableEntry(DEST_ROUTER)->getDestination(), |
| 28 | "destRouter"); |
| 29 | } |
| 30 | |
| 31 | BOOST_AUTO_TEST_SUITE_END() |
| 32 | |
| 33 | } //namespace test |
| 34 | } //namespace nlsr |