xorg-gtest 0.1
Xorg testing extension to Google Test
|
Global Google Test environment providing a dummy X server. More...
#include <xorg/gtest/environment.h>
Public Member Functions | |
Environment (const std::string &path_to_conf, const std::string &path_to_server="Xorg", int display=133) | |
Constructs an object to provide a global X server dummy environment. | |
Protected Member Functions | |
virtual void | SetUp () |
Starts the dummy X server. | |
virtual void | TearDown () |
Stops the dummy X server. |
Global Google Test environment providing a dummy X server.
Starts up a dummy X server for testing purposes. Either associate the environment manually with the overall testing framework like
std::string xorg_conf_path("conf/dummy.conf"); int xorg_display = 133; std::string server("Xorg"); xorg::testing::Environment* environment = new xorg::testing::Environment( xorg_conf_path, server, xorg_display); testing::AddGlobalTestEnvironment(environment);
or link to libxorg-gtest_main.
xorg::testing::Environment::Environment | ( | const std::string & | path_to_conf, |
const std::string & | path_to_server = "Xorg" , |
||
int | display = 133 |
||
) |
Constructs an object to provide a global X server dummy environment.
path_to_conf | Path to xserver configuration. |
path_to_server | Path to xserver executable. |
display | Display port of dummy xserver instance. |
virtual void xorg::testing::Environment::SetUp | ( | ) | [protected, virtual] |
Starts the dummy X server.
Reimplemented from ::testing::Environment. See Google Test documentation for details.
std::runtime_error | if a dummy X server cannot be started. |
virtual void xorg::testing::Environment::TearDown | ( | ) | [protected, virtual] |
Stops the dummy X server.
Reimplemented from ::testing::Environment. See Google Test documentation for details.