Use scoped_ptr instead of deprecated auto_ptr

This commit is contained in:
vitaut
2015-07-29 07:03:15 -07:00
parent 200037683e
commit d02a5031f0
2 changed files with 3 additions and 4 deletions
+2 -2
View File
@@ -26,7 +26,6 @@
*/
#include <cstring>
#include <memory>
#include "gtest-extra.h"
#include "posix.h"
@@ -137,7 +136,8 @@ TEST(BufferedFileTest, CloseFileInDtor) {
}
TEST(BufferedFileTest, CloseErrorInDtor) {
std::auto_ptr<BufferedFile> f(new BufferedFile(open_buffered_file()));
testing::internal::scoped_ptr<BufferedFile> f(
new BufferedFile(open_buffered_file()));
EXPECT_WRITE(stderr, {
// The close function must be called inside EXPECT_WRITE, otherwise
// the system may recycle closed file descriptor when redirecting the