diff options
author | Chase Douglas <chase.douglas@ubuntu.com> | 2011-12-05 16:02:22 -0800 |
---|---|---|
committer | Chase Douglas <chase.douglas@ubuntu.com> | 2011-12-05 16:02:22 -0800 |
commit | ad0ef22400f1b9960e15e0f6fe39b3e95701f21e (patch) | |
tree | 94a96451ff46bce04460ab826a8c5b5bcc832ec9 | |
parent | e10564038f99adee0a12cb028cac5bd1610d7b40 (diff) |
Rename testing::xorg to xorg::testing
Prevents a possible collision with gtest's testing namespace
-rw-r--r-- | include/xorg/gtest/environment.h | 6 | ||||
-rw-r--r-- | src/environment.cpp | 6 | ||||
-rw-r--r-- | src/main.cpp | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/include/xorg/gtest/environment.h b/include/xorg/gtest/environment.h index caf2c08..7741229 100644 --- a/include/xorg/gtest/environment.h +++ b/include/xorg/gtest/environment.h @@ -23,8 +23,8 @@ #include <gtest/gtest.h> -namespace testing { namespace xorg { +namespace testing { /** * @brief Dummy Xorg Google Test environment. @@ -33,7 +33,7 @@ namespace xorg { * display :133. Either associate the environment manually * with the overall testing framework or link to libxtestingenvironment_main.a. */ -class Environment : public testing::Environment { +class Environment : public ::testing::Environment { public: Environment(const std::string& pathToConf, int display = 133); @@ -45,5 +45,5 @@ class Environment : public testing::Environment { pid_t child_pid_; }; -} // namespace xorg } // namespace testing +} // namespace xorg diff --git a/src/environment.cpp b/src/environment.cpp index 908a1dd..4e3df97 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -32,14 +32,14 @@ #include <X11/Xlib.h> -testing::xorg::Environment::Environment(const std::string& path, int display) +xorg::testing::Environment::Environment(const std::string& path, int display) : path_to_conf_(path), display_(display), child_pid_(-1) { } -void testing::xorg::Environment::SetUp() { +void xorg::testing::Environment::SetUp() { static char display_string[6]; snprintf(display_string, 6, ":%d", display_); @@ -90,7 +90,7 @@ void testing::xorg::Environment::SetUp() { } } -void testing::xorg::Environment::TearDown() { +void xorg::testing::Environment::TearDown() { if (child_pid_ && child_pid_ != -1) { if (kill(child_pid_, SIGTERM) < 0) { FAIL() << "Warning: Failed to terminate dummy Xorg server: " diff --git a/src/main.cpp b/src/main.cpp index c3bdcbc..ce16dcc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -80,7 +80,7 @@ int main(int argc, char *argv[]) { } if (!no_dummy_server) { - testing::xorg::Environment* environment = new testing::xorg::Environment( + xorg::testing::Environment* environment = new xorg::testing::Environment( xorg_conf_path, xorg_display); testing::AddGlobalTestEnvironment(environment); |