xorg-gtest 0.1
Xorg testing extension to Google Test
Loading...
Searching...
No Matches
ServerTest Class Reference

Example for a test fixture that starts a server per test. More...

Inheritance diagram for ServerTest:
xorg::testing::Test

Public Member Functions

virtual void SetUp (void)
 Tries to connect to an X server instance.
 
virtual void TearDown (void)
 Closes the display.
 

Protected Attributes

XServer server
 The X server instance.
 

Additional Inherited Members

- Protected Member Functions inherited from xorg::testing::Test
::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().
 

Detailed Description

Example for a test fixture that starts a server per test.

Examples
xorg-gtest-example.cpp.

Member Function Documentation

◆ SetUp()

virtual void ServerTest::SetUp ( void  )
inlinevirtual

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.

Postcondition
Subsequent calls to Display() return a valid pointer or NULL if an error occured.
Exceptions
std::runtime_errorif no X server is running.

Reimplemented from xorg::testing::Test.

Examples
xorg-gtest-example.cpp.

◆ TearDown()

virtual void ServerTest::TearDown ( void  )
inlinevirtual

Closes the display.

Reimplemented from ::testing::Test. See Google Test documentation for details.

Postcondition
Subsequent calls to Display() return NULL.

Reimplemented from xorg::testing::Test.

Examples
xorg-gtest-example.cpp.

Member Data Documentation

◆ server

XServer ServerTest::server
protected

The X server instance.

Examples
xorg-gtest-example.cpp.

The documentation for this class was generated from the following file: