diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-10-24 21:33:44 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-10-27 00:11:41 +0300 |
commit | a864099ba77157090c4cd12817245122c163ec24 (patch) | |
tree | f15b1f2801219fa9af6111fa28591858d87711ec /test/unit_tests/shared/test_data.hpp | |
parent | Process: add termination methods (diff) | |
download | winapi-common-a864099ba77157090c4cd12817245122c163ec24.tar.gz winapi-common-a864099ba77157090c4cd12817245122c163ec24.zip |
rework Process API & tests
* Add separate classes ProcessParameters & ShellParameters for
Process::create() and Process::shell() methods.
* Add a separate "worker" executable. It's used in tests via a fairly
complicated scheme, receiving orders to execute via a shared memory
region.
* Add tests that utilize the Console API, reading console window's
screen buffer directly, making for more reliable tests & broader
coverage.
Diffstat (limited to 'test/unit_tests/shared/test_data.hpp')
-rw-r--r-- | test/unit_tests/shared/test_data.hpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/unit_tests/shared/test_data.hpp b/test/unit_tests/shared/test_data.hpp new file mode 100644 index 0000000..0094f0b --- /dev/null +++ b/test/unit_tests/shared/test_data.hpp @@ -0,0 +1,24 @@ +// Copyright (c) 2020 Egor Tensin <Egor.Tensin@gmail.com> +// This file is part of the "winapi-common" project. +// For details, see https://github.com/egor-tensin/winapi-common. +// Distributed under the MIT License. + +#pragma once + +#include <string> + +namespace worker { +namespace test_data { + +BOOST_STATIC_CONSTEXPR auto str = "Test output."; + +inline std::string out() { + return "stdout: " + std::string{str}; +} + +inline std::string err() { + return "stderr: " + std::string{str}; +} + +} // namespace test_data +} // namespace worker |