xorg-gtest 0.1
Xorg testing extension to Google Test
|
Google Test fixture providing an Xlib connection to an X11 server. More...
#include <xorg/gtest/xorg-gtest-test.h>
Protected Member Functions | |
virtual void | SetUp () |
Tries to connect to an X server instance. | |
virtual void | TearDown () |
Closes the display. | |
::Display * | Display () const |
Accesses the display representing an Xlib connection. | |
void | SetDisplayString (const std::string &display) |
Set the display string used for XOpenDisplay() and thus affects Test::Display(). | |
Google Test fixture providing an Xlib connection to an X11 server.
Sets up and tears down an XLib connection to an X11 server. Rely on Google Test's TEST_F macro to use this fixture for your own tests or subclass it and override the SetUp and TearDown methods.
|
protected |
Accesses the display representing an Xlib connection.
Accessible by subclasses and test cases relying on this fixture.
|
protected |
Set the display string used for XOpenDisplay() and thus affects Test::Display().
This function must be called before xorg::testing::Test::SetUp() to have any effect.
display | The string representing the display connection, or an empty string for NULL |
|
protectedvirtual |
Tries to connect to an X server instance.
Fails if no X server is running. Updates the display object. Reimplemented from ::testing::Test. See Google Test documentation for details.
std::runtime_error | if no X server is running. |
Reimplemented in SubTest, and ServerTest.
|
protectedvirtual |
Closes the display.
Reimplemented from ::testing::Test. See Google Test documentation for details.
Reimplemented in ServerTest.