blob: fac672990fbb6f9cc3b0d0d77ed02a6b39346146 [file] [log] [blame]
Junxiao Shiaf8eeea2014-03-31 20:10:56 -07001/**
2 * Copyright (C) 2013 Regents of the University of California.
3 * See COPYING for copyright and distribution information.
4 */
5
6#include "key-locator.hpp"
7
Alexander Afanasyevb1db7c62014-04-03 14:57:25 -07008#include "boost-test.hpp"
Junxiao Shiaf8eeea2014-03-31 20:10:56 -07009
10namespace ndn {
11
12BOOST_AUTO_TEST_SUITE(TestKeyLocator)
13
14BOOST_AUTO_TEST_CASE(Equality)
15{
16 BOOST_CONCEPT_ASSERT((boost::EqualityComparable<KeyLocator>));
17
18 KeyLocator a;
19 KeyLocator b;
20 BOOST_CHECK_EQUAL(a == b, true);
21 BOOST_CHECK_EQUAL(a != b, false);
22
23 a.setName("ndn:/A");
24 BOOST_CHECK_EQUAL(a == b, false);
25 BOOST_CHECK_EQUAL(a != b, true);
26
27 b.setName("ndn:/B");
28 BOOST_CHECK_EQUAL(a == b, false);
29 BOOST_CHECK_EQUAL(a != b, true);
30
31 b.setName("ndn:/A");
32 BOOST_CHECK_EQUAL(a == b, true);
33 BOOST_CHECK_EQUAL(a != b, false);
34}
35
36BOOST_AUTO_TEST_SUITE_END()
37
38} // namespace ndn