face: Refactored code to set interest filter
Change-Id: I1f9637a79c03a9e24608403d963bbfc4d9bcab1c
diff --git a/tests/main.cpp b/tests/main.cpp
index 6b0a14a..d43aa5a 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -1,10 +1,6 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2013, Regents of the University of California
- *
- * BSD license, See the LICENSE file for more information
- *
- * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * See COPYING for copyright and distribution information.
*/
#define BOOST_TEST_MAIN 1
diff --git a/tests/test-encode-decode-forwarding-entry.cpp b/tests/management/test-ndnd-forwarding-entry.cpp
similarity index 90%
rename from tests/test-encode-decode-forwarding-entry.cpp
rename to tests/management/test-ndnd-forwarding-entry.cpp
index 89c0d46..bd5aa9f 100644
--- a/tests/test-encode-decode-forwarding-entry.cpp
+++ b/tests/management/test-ndnd-forwarding-entry.cpp
@@ -6,7 +6,7 @@
#include <boost/test/unit_test.hpp>
-#include "forwarding-entry.hpp"
+#include "management/ndnd-forwarding-entry.hpp"
#if __clang__
#pragma clang diagnostic push
@@ -18,6 +18,7 @@
using namespace std;
namespace ndn {
+namespace ndnd {
const uint8_t FORWARDING_ENTRY[] = {0x81, 0x19, 0x83, 0x07, 0x73, 0x65, 0x6c, 0x66, 0x72, 0x65, 0x67, 0x03, 0x0b, 0x04, 0x01, 0x61, 0x04, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x8a, 0x01, 0x03};
@@ -25,7 +26,7 @@
BOOST_AUTO_TEST_CASE (Encode)
{
- ndn::ForwardingEntry forwardingEntry("selfreg", "/a/prefix", -1, ForwardingFlags(), -1);
+ ForwardingEntry forwardingEntry("selfreg", "/a/prefix", -1, ForwardingFlags(), -1);
const Block &wire = forwardingEntry.wireEncode();
BOOST_REQUIRE_EQUAL_COLLECTIONS(FORWARDING_ENTRY, FORWARDING_ENTRY+sizeof(FORWARDING_ENTRY),
@@ -34,7 +35,7 @@
BOOST_AUTO_TEST_CASE (Decode)
{
- ndn::ForwardingEntry forwardingEntry;
+ ForwardingEntry forwardingEntry;
BOOST_REQUIRE_NO_THROW(forwardingEntry.wireDecode(Block(FORWARDING_ENTRY, sizeof(FORWARDING_ENTRY))));
@@ -54,4 +55,5 @@
BOOST_AUTO_TEST_SUITE_END()
+} // namespace ndnd
} // namespace ndn
diff --git a/tests/test-nfd-control.cpp b/tests/management/test-nfd-control.cpp
similarity index 100%
rename from tests/test-nfd-control.cpp
rename to tests/management/test-nfd-control.cpp
diff --git a/tests/test-all.hpp b/tests/test-all.hpp
new file mode 100644
index 0000000..0e4c8c5
--- /dev/null
+++ b/tests/test-all.hpp
@@ -0,0 +1,11 @@
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef NDN_TEST_ALL_HPP
+#define NDN_TEST_ALL_HPP
+
+#include "common.hpp"
+
+#endif
diff --git a/tests/test-encode-decode-block.cpp b/tests/test-encode-decode-block.cpp
index fe433a4..9e5e01c 100644
--- a/tests/test-encode-decode-block.cpp
+++ b/tests/test-encode-decode-block.cpp
@@ -1,6 +1,5 @@
/**
* Copyright (C) 2013 Regents of the University of California.
- * @author: Jeff Thompson <jefft0@remap.ucla.edu>
* See COPYING for copyright and distribution information.
*/
diff --git a/tests/test-encode-decode-data.cpp b/tests/test-encode-decode-data.cpp
index 0e13d75..239778b 100644
--- a/tests/test-encode-decode-data.cpp
+++ b/tests/test-encode-decode-data.cpp
@@ -1,6 +1,5 @@
/**
* Copyright (C) 2013 Regents of the University of California.
- * @author: Jeff Thompson <jefft0@remap.ucla.edu>
* See COPYING for copyright and distribution information.
*/
diff --git a/tests/test-encode-decode-interest.cpp b/tests/test-encode-decode-interest.cpp
index 09057fb..4c6daaa 100644
--- a/tests/test-encode-decode-interest.cpp
+++ b/tests/test-encode-decode-interest.cpp
@@ -1,6 +1,5 @@
/**
* Copyright (C) 2013 Regents of the University of California.
- * @author: Jeff Thompson <jefft0@remap.ucla.edu>
* See COPYING for copyright and distribution information.
*/
diff --git a/tests/test-exclude.cpp b/tests/test-exclude.cpp
index 6f7f306..033fdea 100644
--- a/tests/test-exclude.cpp
+++ b/tests/test-exclude.cpp
@@ -1,11 +1,6 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2013, Regents of the University of California
- * Alexander Afanasyev
- *
- * BSD license, See the LICENSE file for more information
- *
- * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * See COPYING for copyright and distribution information.
*/
#include "exclude.hpp"
diff --git a/tests/test-faces.cpp b/tests/test-faces.cpp
index 67c5add..498ca73 100644
--- a/tests/test-faces.cpp
+++ b/tests/test-faces.cpp
@@ -1,6 +1,5 @@
/**
* Copyright (C) 2013 Regents of the University of California.
- * @author: Jeff Thompson <jefft0@remap.ucla.edu>
* See COPYING for copyright and distribution information.
*/
diff --git a/tests/test-name.cpp b/tests/test-name.cpp
index a4e86d0..b6501d6 100644
--- a/tests/test-name.cpp
+++ b/tests/test-name.cpp
@@ -1,6 +1,5 @@
/**
* Copyright (C) 2013 Regents of the University of California.
- * @author: Jeff Thompson <jefft0@remap.ucla.edu>
* See COPYING for copyright and distribution information.
*/
diff --git a/tests/wscript b/tests/wscript
index 4fbfb4a..8a5de6e 100644
--- a/tests/wscript
+++ b/tests/wscript
@@ -21,5 +21,5 @@
unittests.source += bld.path.ant_glob('**/*-sqlite3.cpp')
if bld.env['WITH_PCH']:
- unittests.pch = "../src/common.hpp"
+ unittests.pch = "test-all.hpp"