diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-06-28 12:44:55 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-07-12 08:10:44 +1000 |
commit | fbafda2e843e5d63a78fe9f4c03c0ff1096d7a1f (patch) | |
tree | c74fdff60b3db219a9cbb45f2e126d249a03e0d0 /include | |
parent | cbe0fc53d53de0559e0989bba9498c87c33502d7 (diff) |
test: add SetDisplayString()
Don't rely on the environment alone, take the display string if it's been
set.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/xorg/gtest/xorg-gtest-test.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/xorg/gtest/xorg-gtest-test.h b/include/xorg/gtest/xorg-gtest-test.h index 3b78a17..a776693 100644 --- a/include/xorg/gtest/xorg-gtest-test.h +++ b/include/xorg/gtest/xorg-gtest-test.h @@ -88,6 +88,16 @@ class Test : public ::testing::Test { */ ::Display* Display() const; + /** + * 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. + * + * @param display The string representing the display connection, or an + * empty string for NULL + */ + void SetDisplayString(const std::string &display); + /** @cond Implementation */ struct Private; std::auto_ptr<Private> d_; |