process-cpp
3.0.0
A simple convenience library for handling processes in C++11.
|
#include <core/posix/exit.h>
#include <core/posix/fork.h>
#include <core/posix/visibility.h>
#include <functional>
Go to the source code of this file.
Namespaces | |
core | |
core::testing | |
Macros | |
#define | TESTP(test_suite, test_name, CODE) |
#define | TESTP_F(test_fixture, test_name, CODE) |
Enumerations | |
enum | core::testing::ForkAndRunResult { core::testing::ForkAndRunResult::empty = 0, core::testing::ForkAndRunResult::client_failed = 1 << 0, core::testing::ForkAndRunResult::service_failed = 1 << 1 } |
The ForkAndRunResult enum models the different failure modes of fork_and_run. More... | |
Functions | |
CORE_POSIX_DLL_PUBLIC ForkAndRunResult | core::testing::operator| (ForkAndRunResult lhs, ForkAndRunResult rhs) |
CORE_POSIX_DLL_PUBLIC ForkAndRunResult | core::testing::operator& (ForkAndRunResult lhs, ForkAndRunResult rhs) |
CORE_POSIX_DLL_PUBLIC ForkAndRunResult | core::testing::fork_and_run (const std::function< core::posix::exit::Status()> &service, const std::function< core::posix::exit::Status()> &client) |
Forks two processes for both the service and the client. More... | |
#define TESTP | ( | test_suite, | |
test_name, | |||
CODE | |||
) |
Test definition macro which runs a TEST in a forked process. Note that you can only use EXPECT_*, not ASSERT_*!
Usage: TESTP(test_suite, test_name, { test code ... EXPECT_* ... })
Definition at line 75 of file fork_and_run.h.
#define TESTP_F | ( | test_fixture, | |
test_name, | |||
CODE | |||
) |
Test definition macro which runs a TEST_F in a forked process. Note that you can only use EXPECT_*, not ASSERT_*!
Usage: TESTP_F(FixtureName, TestName, { ... test code ... EXPECT_* ... })
Definition at line 100 of file fork_and_run.h.