aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/unit_tests/shared
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit_tests/shared')
-rw-r--r--test/unit_tests/shared/command.hpp3
-rw-r--r--test/unit_tests/shared/console.hpp4
-rw-r--r--test/unit_tests/shared/test_data.hpp2
-rw-r--r--test/unit_tests/shared/worker.hpp33
4 files changed, 7 insertions, 35 deletions
diff --git a/test/unit_tests/shared/command.hpp b/test/unit_tests/shared/command.hpp
index 4a91370..4ba9385 100644
--- a/test/unit_tests/shared/command.hpp
+++ b/test/unit_tests/shared/command.hpp
@@ -9,7 +9,6 @@
#include <winapi/shmem.hpp>
-#include <boost/config.hpp>
#include <boost/interprocess/sync/interprocess_condition.hpp>
#include <boost/interprocess/sync/interprocess_mutex.hpp>
#include <boost/interprocess/sync/scoped_lock.hpp>
@@ -29,7 +28,7 @@ struct StdHandles {
HANDLE err;
};
-BOOST_STATIC_CONSTEXPR auto COMMAND_SHMEM_NAME = "shmem-test-cmd";
+static constexpr auto COMMAND_SHMEM_NAME = "shmem-test-cmd";
class Command {
public:
diff --git a/test/unit_tests/shared/console.hpp b/test/unit_tests/shared/console.hpp
index 48d1faa..cdc12e4 100644
--- a/test/unit_tests/shared/console.hpp
+++ b/test/unit_tests/shared/console.hpp
@@ -28,9 +28,9 @@ class Buffer {
public:
typedef CONSOLE_SCREEN_BUFFER_INFO Info;
- Buffer() : m_handle(winapi::Handle::std_out()), m_info(get_info(m_handle)) {}
+ Buffer() : m_handle{winapi::Handle::std_out()}, m_info{get_info(m_handle)} {}
- Buffer(winapi::Handle&& handle) : m_handle(std::move(handle)), m_info(get_info(m_handle)) {}
+ Buffer(winapi::Handle&& handle) : m_handle{std::move(handle)}, m_info{get_info(m_handle)} {}
int16_t get_columns() const { return m_info.dwSize.X; }
diff --git a/test/unit_tests/shared/test_data.hpp b/test/unit_tests/shared/test_data.hpp
index 0094f0b..1c8316a 100644
--- a/test/unit_tests/shared/test_data.hpp
+++ b/test/unit_tests/shared/test_data.hpp
@@ -10,7 +10,7 @@
namespace worker {
namespace test_data {
-BOOST_STATIC_CONSTEXPR auto str = "Test output.";
+static constexpr auto str = "Test output.";
inline std::string out() {
return "stdout: " + std::string{str};
diff --git a/test/unit_tests/shared/worker.hpp b/test/unit_tests/shared/worker.hpp
index a1067ac..9ba7020 100644
--- a/test/unit_tests/shared/worker.hpp
+++ b/test/unit_tests/shared/worker.hpp
@@ -9,8 +9,6 @@
#include <winapi/process.hpp>
-#include <boost/config.hpp>
-
#include <windows.h>
#include <exception>
@@ -22,23 +20,11 @@ namespace worker {
class Worker {
public:
- Worker(winapi::Process&& process) : m_cmd(Command::create()), m_process(std::move(process)) {}
-
- Worker(Worker&& other) BOOST_NOEXCEPT_OR_NOTHROW : m_cmd(std::move(other.m_cmd)),
- m_process(std::move(other.m_process)) {}
-
- Worker& operator=(Worker other) BOOST_NOEXCEPT_OR_NOTHROW {
- swap(other);
- return *this;
- }
-
- void swap(Worker& other) BOOST_NOEXCEPT_OR_NOTHROW {
- using std::swap;
- swap(m_cmd, other.m_cmd);
- swap(m_process, other.m_process);
- }
+ Worker(winapi::Process&& process) : m_cmd{Command::create()}, m_process{std::move(process)} {}
+ Worker(Worker&& other) noexcept = default;
Worker(const Worker&) = delete;
+ Worker& operator=(const Worker& other) noexcept = default;
~Worker() {
try {
@@ -101,17 +87,4 @@ private:
winapi::Process m_process;
};
-inline void swap(Worker& a, Worker& b) BOOST_NOEXCEPT_OR_NOTHROW {
- a.swap(b);
-}
-
} // namespace worker
-
-namespace std {
-
-template <>
-inline void swap(worker::Worker& a, worker::Worker& b) BOOST_NOEXCEPT_OR_NOTHROW {
- a.swap(b);
-}
-
-} // namespace std