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 "adjacent.hpp" |
| 7 | #include <boost/test/unit_test.hpp> |
| 8 | |
| 9 | namespace nlsr { |
| 10 | |
| 11 | namespace test { |
| 12 | |
| 13 | using namespace std; |
| 14 | |
| 15 | BOOST_AUTO_TEST_SUITE(TestAdjacenct) |
| 16 | |
| 17 | BOOST_AUTO_TEST_CASE(AdjacenctBasic) |
| 18 | { |
| 19 | const string ADJ_NAME_1 = "testname"; |
| 20 | const string ADJ_NAME_2 = "testname"; |
| 21 | |
| 22 | Adjacent adjacent1(ADJ_NAME_1); |
| 23 | Adjacent adjacent2(ADJ_NAME_2); |
akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame^] | 24 | BOOST_CHECK(adjacent1 == adjacent2); |
Ashlesh Gawande | eb582eb | 2014-05-01 14:25:20 -0500 | [diff] [blame] | 25 | |
| 26 | adjacent1.setLinkCost(10.5); |
| 27 | BOOST_CHECK_CLOSE(adjacent1.getLinkCost(), 10.5, 0.0001); |
| 28 | |
| 29 | BOOST_CHECK_EQUAL(adjacent1.getName(), "testname"); |
| 30 | |
| 31 | } |
| 32 | |
| 33 | BOOST_AUTO_TEST_SUITE_END() |
| 34 | |
| 35 | } //namespace tests |
| 36 | } //namespace nlsr |