Files
NLSR/tests/test-map.cpp
T
Ashlesh Gawande eb582eb919 tests: Adding unit tests.
The purpose of this commit is to start pushing unit test I am writing. I will add more unit tests in each patch

Refs: #1496

Change-Id: Ic132adddfa06a95780712eba63966d3bab4743af
2014-05-01 14:47:06 -05:00

32 lines
547 B
C++

/**
* Copyright (C) 2014 Regents of the University of Memphis.
* See COPYING for copyright and distribution information.
*/
#include "route/map.hpp"
#include <boost/test/unit_test.hpp>
namespace nlsr {
namespace test {
BOOST_AUTO_TEST_SUITE(TestMap)
BOOST_AUTO_TEST_CASE(MapAddElementAndSize)
{
Map map1;
std::string router1 = "r1";
std::string router2 = "r2";
map1.addElement(router1);
map1.addElement(router2);
BOOST_CHECK_EQUAL(map1.getMapSize(), 2);
}
BOOST_AUTO_TEST_SUITE_END()
} //namespace test
} //namespace nlsr