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 "name-prefix-list.hpp" |
| 7 | #include <boost/test/unit_test.hpp> |
| 8 | |
| 9 | namespace nlsr { |
| 10 | |
| 11 | namespace test { |
| 12 | |
| 13 | BOOST_AUTO_TEST_SUITE(TestNpl) |
| 14 | |
| 15 | BOOST_AUTO_TEST_CASE(NplSizeAndRemove) |
| 16 | { |
| 17 | NamePrefixList npl1; |
| 18 | |
| 19 | std::string a = "testname"; |
| 20 | std::string b = "name"; |
| 21 | |
| 22 | npl1.insert(a); |
| 23 | npl1.insert(b); |
| 24 | |
| 25 | BOOST_CHECK_EQUAL(npl1.getSize(), 2); |
| 26 | |
| 27 | npl1.remove(b); |
| 28 | |
| 29 | BOOST_CHECK_EQUAL(npl1.getSize(), 1); |
| 30 | } |
| 31 | |
| 32 | BOOST_AUTO_TEST_SUITE_END() |
| 33 | |
| 34 | } //namespace test |
| 35 | } //namespace nlsr |