[PATCH xorg-gtest 14/16] xserver: update documentation

Peter Hutterer peter.hutterer at who-t.net
Mon Jul 2 23:44:55 PDT 2012


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 include/xorg/gtest/xorg-gtest-xserver.h |   21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/include/xorg/gtest/xorg-gtest-xserver.h b/include/xorg/gtest/xorg-gtest-xserver.h
index 707888e..6eb2241 100644
--- a/include/xorg/gtest/xorg-gtest-xserver.h
+++ b/include/xorg/gtest/xorg-gtest-xserver.h
@@ -40,7 +40,26 @@ namespace testing {
 /**
  * @class XServer xorg-gtest_xserver.h xorg/gtest/xorg-gtest_xserver.h
  *
- * Miscellaneous interfaces to communicate with the X server.
+ * Class representing the X server process.
+ *
+ * @code
+ * XServer server;
+ * server.SetOption("-logfile", "/tmp/Xserver.log");
+ *
+ * try {
+ *   server.Start();
+ * } catch (const std::runtime_error &e) {
+ *   std::cerr << "Problem starting the X server: " << e.what() << std::endl;
+ * }
+ *
+ * ...
+ *
+ * if (!server.Terminate()) {
+ *   std::cerr << "Problem terminating server ... killing now ..." << std::endl;
+ *   if (!server.Kill())
+ *     std::cerr << "Problem killing server" << std::endl;
+ * }
+ * @endcode
  */
 class XServer : public xorg::testing::Process {
   public:
-- 
1.7.10.4



More information about the xorg-devel mailing list