interest: Interest::matchesData function

refs #1157

Change-Id: I5b74367cb1afed75728e2d5092ced5d269332f9d
diff --git a/tests/key-locator.cpp b/tests/key-locator.cpp
new file mode 100644
index 0000000..00f4ff9
--- /dev/null
+++ b/tests/key-locator.cpp
@@ -0,0 +1,39 @@
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * See COPYING for copyright and distribution information.
+ */
+
+#include "key-locator.hpp"
+
+#include <boost/test/unit_test.hpp>
+#include <boost/concept_check.hpp>
+
+namespace ndn {
+
+BOOST_AUTO_TEST_SUITE(TestKeyLocator)
+
+BOOST_AUTO_TEST_CASE(Equality)
+{
+  BOOST_CONCEPT_ASSERT((boost::EqualityComparable<KeyLocator>));
+
+  KeyLocator a;
+  KeyLocator b;
+  BOOST_CHECK_EQUAL(a == b, true);
+  BOOST_CHECK_EQUAL(a != b, false);
+
+  a.setName("ndn:/A");
+  BOOST_CHECK_EQUAL(a == b, false);
+  BOOST_CHECK_EQUAL(a != b, true);
+
+  b.setName("ndn:/B");
+  BOOST_CHECK_EQUAL(a == b, false);
+  BOOST_CHECK_EQUAL(a != b, true);
+
+  b.setName("ndn:/A");
+  BOOST_CHECK_EQUAL(a == b, true);
+  BOOST_CHECK_EQUAL(a != b, false);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace ndn