diff options
-rw-r--r-- | include/xorg/gtest/test.h | 5 | ||||
-rw-r--r-- | src/test.cpp | 4 |
2 files changed, 3 insertions, 6 deletions
diff --git a/include/xorg/gtest/test.h b/include/xorg/gtest/test.h index 0890cbf..e27a947 100644 --- a/include/xorg/gtest/test.h +++ b/include/xorg/gtest/test.h @@ -22,6 +22,8 @@ #ifndef XORG_GTEST_TEST_H_ #define XORG_GTEST_TEST_H_ +#include <memory> + #include <gtest/gtest.h> #include <X11/Xlib.h> @@ -33,7 +35,6 @@ namespace testing { class Test : public ::testing::Test { public: Test(); - virtual ~Test(); virtual void SetUp(); virtual void TearDown(); @@ -42,7 +43,7 @@ class Test : public ::testing::Test { ::Display* Display() const; struct Private; - Private* d_; + std::auto_ptr<Private> d_; private: /* Disable copy c'tor, assignment operator */ diff --git a/src/test.cpp b/src/test.cpp index 0ae31cf..565c321 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -44,7 +44,3 @@ void xorg::testing::Test::TearDown() { ::Display* xorg::testing::Test::Display() const { return d_->display; } - -xorg::testing::Test::~Test() { - delete d_; -} |