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.hpp" |
| 7 | #include <boost/test/unit_test.hpp> |
| 8 | |
| 9 | namespace nlsr { |
| 10 | |
| 11 | namespace test { |
| 12 | |
| 13 | BOOST_AUTO_TEST_SUITE(TestNexthop) |
| 14 | |
| 15 | BOOST_AUTO_TEST_CASE(NexthopSetAndGet) |
| 16 | { |
| 17 | NextHop np1; |
| 18 | |
akmhoque | 157b0a4 | 2014-05-13 00:26:37 -0500 | [diff] [blame^] | 19 | np1.setConnectingFaceUri("udp://test/uri"); |
Ashlesh Gawande | eb582eb | 2014-05-01 14:25:20 -0500 | [diff] [blame] | 20 | |
| 21 | np1.setRouteCost(10.5); |
| 22 | |
akmhoque | 157b0a4 | 2014-05-13 00:26:37 -0500 | [diff] [blame^] | 23 | BOOST_CHECK_EQUAL(np1.getConnectingFaceUri(), "udp://test/uri"); |
Ashlesh Gawande | eb582eb | 2014-05-01 14:25:20 -0500 | [diff] [blame] | 24 | BOOST_CHECK_CLOSE(np1.getRouteCost(), 10.5, 0.0001); |
| 25 | } |
| 26 | |
| 27 | BOOST_AUTO_TEST_SUITE_END() |
| 28 | |
| 29 | } //namespace test |
| 30 | } //namespace nlsr |