Updating the build framework
diff --git a/tests/NameServer_test.cpp b/tests/NameServer_test.cpp
deleted file mode 100644
index 92e8bcb..0000000
--- a/tests/NameServer_test.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * NameServer_test.cpp
- *
- *  Created on: 18 Jul, 2014
- *      Author: shock
- */
-
-#include "tool/nameServer.h"
-
-namespace ndn {
-
-} /* namespace ndn */
diff --git a/tests/Query_test.cpp b/tests/Query_test.cpp
deleted file mode 100644
index 57feefb..0000000
--- a/tests/Query_test.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * query_test.cpp
- *
- *  Created on: 18 Jul, 2014
- *      Author: shock
- */
-
-#include "src/query.h"
-
-namespace ndn {
-
-} /* namespace ndn */
diff --git a/tests/RR_test.cpp b/tests/RR_test.cpp
deleted file mode 100644
index b14702d..0000000
--- a/tests/RR_test.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * RR_test.cpp
- *
- *  Created on: 18 Jul, 2014
- *      Author: shock
- */
-
-#include "../src/RR.h"
-
-
-int
-main(int argc, char *argv[])
-{
-	ndn::RR rr;
-	rr.setRrdata("www2.ex.com");
-
-	ndn::Block block = rr.wireEncode();
-
-	ndn::RR rr2;
-	rr2.wireDecode(block);
-	cout<<rr.getRrdata()<<endl;
-
-	return 0;
-}//main
diff --git a/tests/Resolver_test.cpp b/tests/Resolver_test.cpp
deleted file mode 100644
index 7db3f1f..0000000
--- a/tests/Resolver_test.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * Resolver_test.cpp
- *
- *  Created on: 18 Jul, 2014
- *      Author: shock
- */
-
-#include "resolver.h"
-
-namespace ndn {
-
-} /* namespace ndn */
diff --git a/tests/Zone_test.cpp b/tests/Zone_test.cpp
deleted file mode 100644
index da5df01..0000000
--- a/tests/Zone_test.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * zone_test.cpp
- *
- *  Created on: 18 Jul, 2014
- *      Author: shock
- */
-
-#include "src/zone.h"
-
-namespace ndn {
-
-} /* namespace ndn */
diff --git a/tests/main.cpp b/tests/main.cpp
new file mode 100644
index 0000000..eec5adb
--- /dev/null
+++ b/tests/main.cpp
@@ -0,0 +1,23 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014, Regents of the University of California.
+ *
+ * This file is part of NDNS (Named Data Networking Domain Name Service).
+ * See AUTHORS.md for complete list of NDNS authors and contributors.
+ *
+ * NDNS is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define BOOST_TEST_MAIN 1
+#define BOOST_TEST_DYN_LINK 1
+
+#include <boost/test/unit_test.hpp>
diff --git a/tests/unit/nameserver.cpp b/tests/unit/nameserver.cpp
new file mode 100644
index 0000000..de9f726
--- /dev/null
+++ b/tests/unit/nameserver.cpp
@@ -0,0 +1,28 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014, Regents of the University of California.
+ *
+ * This file is part of NDNS (Named Data Networking Domain Name Service).
+ * See AUTHORS.md for complete list of NDNS authors and contributors.
+ *
+ * NDNS is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "tool/nameServer.h"
+
+namespace ndn {
+namespace ndns {
+namespace tests {
+
+} // namespace tests
+} // namespace ndns
+} // namespace ndn
diff --git a/tests/unit/query.cpp b/tests/unit/query.cpp
new file mode 100644
index 0000000..a92a5d1
--- /dev/null
+++ b/tests/unit/query.cpp
@@ -0,0 +1,28 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014, Regents of the University of California.
+ *
+ * This file is part of NDNS (Named Data Networking Domain Name Service).
+ * See AUTHORS.md for complete list of NDNS authors and contributors.
+ *
+ * NDNS is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "src/query.h"
+
+namespace ndn {
+namespace ndns {
+namespace tests {
+
+} // namespace tests
+} // namespace ndns
+} // namespace ndn
diff --git a/tests/unit/resolver.cpp b/tests/unit/resolver.cpp
new file mode 100644
index 0000000..959a58e
--- /dev/null
+++ b/tests/unit/resolver.cpp
@@ -0,0 +1,28 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014, Regents of the University of California.
+ *
+ * This file is part of NDNS (Named Data Networking Domain Name Service).
+ * See AUTHORS.md for complete list of NDNS authors and contributors.
+ *
+ * NDNS is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "resolver.h"
+
+namespace ndn {
+namespace ndns {
+namespace tests {
+
+} // namespace tests
+} // namespace ndns
+} // namespace ndn
diff --git a/tests/unit/rr.cpp b/tests/unit/rr.cpp
new file mode 100644
index 0000000..666aeeb
--- /dev/null
+++ b/tests/unit/rr.cpp
@@ -0,0 +1,47 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014, Regents of the University of California.
+ *
+ * This file is part of NDNS (Named Data Networking Domain Name Service).
+ * See AUTHORS.md for complete list of NDNS authors and contributors.
+ *
+ * NDNS is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "rr.hpp"
+
+#include <boost/test/unit_test.hpp>
+
+namespace ndn {
+namespace ndns {
+namespace tests {
+
+BOOST_AUTO_TEST_SUITE(Rr)
+
+BOOST_AUTO_TEST_CASE(Encode)
+{
+  ndn::RR rr;
+  rr.setRrdata("www2.ex.com");
+
+  ndn::Block block = rr.wireEncode();
+
+  ndn::RR rr2;
+  rr2.wireDecode(block);
+
+  BOOST_TEST_EQUAL(rr.getRrdata(), "?");
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace tests
+} // namespace ndns
+} // namespace ndn
diff --git a/tests/unit/zone.cpp b/tests/unit/zone.cpp
new file mode 100644
index 0000000..252e22f
--- /dev/null
+++ b/tests/unit/zone.cpp
@@ -0,0 +1,28 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014, Regents of the University of California.
+ *
+ * This file is part of NDNS (Named Data Networking Domain Name Service).
+ * See AUTHORS.md for complete list of NDNS authors and contributors.
+ *
+ * NDNS is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "src/zone.h"
+
+namespace ndn {
+namespace ndns {
+namespace tests {
+
+} // namespace tests
+} // namespace ndns
+} // namespace ndn
diff --git a/tests/wscript b/tests/wscript
new file mode 100644
index 0000000..261209b
--- /dev/null
+++ b/tests/wscript
@@ -0,0 +1,33 @@
+# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+from waflib import Utils
+
+top = '..'
+
+def build(bld):
+    if bld.env['WITH_TESTS']:
+        tests_base = bld(
+            target='tests-base',
+            name='tests-base',
+            features='cxx',
+            source=bld.path.ant_glob(['*.cpp']),
+            use='ndns-objects',
+          )
+
+        # unit tests
+        unit_tests = bld.program(
+            target='../unit-tests',
+            features='cxx cxxprogram',
+            source=bld.path.ant_glob(['unit/**/*.cpp']),
+            use='tests-base',
+            install_path=None,
+          )
+
+        # integrated tests
+        unit_tests_nfd = bld.program(
+            target='../integrated-tests',
+            features='cxx cxxprogram',
+            source=bld.path.ant_glob(['integrated/**/*.cpp']),
+            use='tests-base',
+            install_path=None,
+          )