From 700a402244a1a423da4f3ba8032459f4b65fa18f Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Mon, 19 May 2014 16:49:03 -0700 Subject: Now we have a proper C++ library, use std::unique_ptr. Also remove the Android.libcxx.mk and other bits of stlport compatibility mechanics. Change-Id: Icdf7188ba3c79cdf5617672c1cfd0a68ae596a61 --- runtime/base/unix_file/random_access_file_test.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'runtime/base/unix_file/random_access_file_test.h') diff --git a/runtime/base/unix_file/random_access_file_test.h b/runtime/base/unix_file/random_access_file_test.h index 67e8c229f9..1d0b866960 100644 --- a/runtime/base/unix_file/random_access_file_test.h +++ b/runtime/base/unix_file/random_access_file_test.h @@ -18,11 +18,10 @@ #define ART_RUNTIME_BASE_UNIX_FILE_RANDOM_ACCESS_FILE_TEST_H_ #include - +#include #include #include "common_runtime_test.h" -#include "UniquePtrCompat.h" namespace unix_file { @@ -62,7 +61,7 @@ class RandomAccessFileTest : public testing::Test { void TestRead() { char buf[256]; - UniquePtr file(MakeTestFile()); + std::unique_ptr file(MakeTestFile()); // Reading from the start of an empty file gets you zero bytes, however many // you ask for. @@ -77,7 +76,7 @@ class RandomAccessFileTest : public testing::Test { void TestReadContent(const std::string& content, RandomAccessFile* file) { const int buf_size = content.size() + 10; - UniquePtr buf(new char[buf_size]); + std::unique_ptr buf(new char[buf_size]); // Can't read from a negative offset. ASSERT_EQ(-EINVAL, file->Read(buf.get(), 0, -123)); @@ -107,7 +106,7 @@ class RandomAccessFileTest : public testing::Test { void TestSetLength() { const std::string content("hello"); - UniquePtr file(MakeTestFile()); + std::unique_ptr file(MakeTestFile()); ASSERT_EQ(content.size(), static_cast(file->Write(content.data(), content.size(), 0))); ASSERT_EQ(content.size(), static_cast(file->GetLength())); @@ -132,7 +131,7 @@ class RandomAccessFileTest : public testing::Test { void TestWrite() { const std::string content("hello"); - UniquePtr file(MakeTestFile()); + std::unique_ptr file(MakeTestFile()); // Can't write to a negative offset. ASSERT_EQ(-EINVAL, file->Write(content.data(), 0, -123)); -- cgit v1.2.3