tests: respect naming conventions and improve nesting of some test suites
Change-Id: I255c27b552b32570871a9d5f8bda814ba8723c80
Refs: #2497
diff --git a/tests/unit-tests/transport/tcp-transport.t.cpp b/tests/unit-tests/transport/tcp-transport.t.cpp
index 3e9a99b..2386553 100644
--- a/tests/unit-tests/transport/tcp-transport.t.cpp
+++ b/tests/unit-tests/transport/tcp-transport.t.cpp
@@ -27,7 +27,10 @@
namespace ndn {
namespace tests {
-BOOST_FIXTURE_TEST_SUITE(TransportTcpTransport, TransportFixture)
+BOOST_AUTO_TEST_SUITE(Transport)
+BOOST_FIXTURE_TEST_SUITE(TestTcpTransport, TransportFixture)
+
+using ndn::Transport;
BOOST_AUTO_TEST_CASE(GetDefaultSocketNameOk)
{
@@ -81,7 +84,8 @@
});
}
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestTcpTransport
+BOOST_AUTO_TEST_SUITE_END() // Transport
} // namespace tests
} // namespace ndn
diff --git a/tests/unit-tests/transport/transport-fixture.hpp b/tests/unit-tests/transport/transport-fixture.hpp
index 71970c5..602ba5f 100644
--- a/tests/unit-tests/transport/transport-fixture.hpp
+++ b/tests/unit-tests/transport/transport-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -20,29 +20,29 @@
*/
#include "util/config-file.hpp"
-#include "../util/test-home-environment-fixture.hpp"
+#include "../test-home-env-saver.hpp"
#ifndef NDN_TESTS_UNIT_TESTS_TRANSPORT_FIXTURE_HPP
#define NDN_TESTS_UNIT_TESTS_TRANSPORT_FIXTURE_HPP
namespace ndn {
+namespace tests {
-class TransportFixture : public util::TestHomeEnvironmentFixture
+class TransportFixture : public TestHomeEnvSaver
{
public:
-
void
initializeConfig(const char* path)
{
setenv("TEST_HOME", path, 1);
- m_config.reset(new ConfigFile);
+ m_config = make_unique<ConfigFile>();
}
protected:
- std::string m_HOME;
unique_ptr<ConfigFile> m_config;
};
+} // namespace tests
} // namespace ndn
#endif // NDN_TESTS_UNIT_TESTS_TRANSPORT_FIXTURE_HPP
diff --git a/tests/unit-tests/transport/unix-transport.t.cpp b/tests/unit-tests/transport/unix-transport.t.cpp
index 86bd7f3..f3d4cac 100644
--- a/tests/unit-tests/transport/unix-transport.t.cpp
+++ b/tests/unit-tests/transport/unix-transport.t.cpp
@@ -27,7 +27,10 @@
namespace ndn {
namespace tests {
-BOOST_FIXTURE_TEST_SUITE(TransportUnixTransport, TransportFixture)
+BOOST_AUTO_TEST_SUITE(Transport)
+BOOST_FIXTURE_TEST_SUITE(TestUnixTransport, TransportFixture)
+
+using ndn::Transport;
BOOST_AUTO_TEST_CASE(GetDefaultSocketNameOk)
{
@@ -58,7 +61,8 @@
});
}
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestUnixTransport
+BOOST_AUTO_TEST_SUITE_END() // Transport
} // namespace tests
} // namespace ndn