~chasedouglas/xorg-gtest/fixes

« back to all changes in this revision

Viewing changes to include/xorg/gtest/environment.h

  • Committer: Chase Douglas
  • Date: 2011-12-12 19:28:13 UTC
  • mfrom: (2.1.27 x-testing-environment)
  • Revision ID: chase.douglas@ubuntu.com-20111212192813-05hq2pwid8grfmjp
Merge cleanup and fixes branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
19
19
 *
20
20
 ****************************************************************************/
 
21
#ifndef XORG_GTEST_ENVIRONMENT_H
 
22
#define XORG_GTEST_ENVIRONMENT_H
21
23
 
 
24
#include <memory>
22
25
#include <string>
23
26
 
24
27
#include <gtest/gtest.h>
31
34
 *
32
35
 * Starts up a dummy Xorg server for testing purposes on
33
36
 * display :133. Either associate the environment manually
34
 
 * with the overall testing framework or link to libxtestingenvironment_main.a.
 
37
 * with the overall testing framework or link to libxorg-gtest_main.
35
38
 */
36
39
class Environment : public ::testing::Environment {
37
40
 public:
38
 
  Environment(const std::string& pathToConf, int display = 133);
 
41
  Environment(const std::string& path_to_conf,
 
42
              const std::string& path_to_server = "Xorg", int display = 133);
39
43
 
40
44
  virtual void SetUp();
41
45
  virtual void TearDown();
42
46
 private:
43
 
  std::string path_to_conf_;
44
 
  int display_;
45
 
  pid_t child_pid_;
 
47
  struct Private;
 
48
  std::auto_ptr<Private> d_;
 
49
 
 
50
  /* Disable copy c'tor & assignment op. */
 
51
  Environment(const Environment&);
 
52
  Environment& operator=(const Environment&);
46
53
};
47
54
 
48
55
} // namespace testing
49
56
} // namespace xorg
 
57
 
 
58
#endif // XORG_GTEST_ENVIRONMENT_H