Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(862)

Unified Diff: base/environment_unittest.cc

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/environment.cc ('k') | base/feature_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/environment_unittest.cc
diff --git a/base/environment_unittest.cc b/base/environment_unittest.cc
index 77e971787dd72a434220772f50119f8edf0746c0..ef264cf619f6af50048b5fe5f2a54c3dc059eaa9 100644
--- a/base/environment_unittest.cc
+++ b/base/environment_unittest.cc
@@ -3,7 +3,9 @@
// found in the LICENSE file.
#include "base/environment.h"
-#include "base/memory/scoped_ptr.h"
+
+#include <memory>
+
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -14,14 +16,14 @@ namespace base {
TEST_F(EnvironmentTest, GetVar) {
// Every setup should have non-empty PATH...
- scoped_ptr<Environment> env(Environment::Create());
+ std::unique_ptr<Environment> env(Environment::Create());
std::string env_value;
EXPECT_TRUE(env->GetVar("PATH", &env_value));
EXPECT_NE(env_value, "");
}
TEST_F(EnvironmentTest, GetVarReverse) {
- scoped_ptr<Environment> env(Environment::Create());
+ std::unique_ptr<Environment> env(Environment::Create());
const char kFooUpper[] = "FOO";
const char kFooLower[] = "foo";
@@ -50,12 +52,12 @@ TEST_F(EnvironmentTest, GetVarReverse) {
TEST_F(EnvironmentTest, HasVar) {
// Every setup should have PATH...
- scoped_ptr<Environment> env(Environment::Create());
+ std::unique_ptr<Environment> env(Environment::Create());
EXPECT_TRUE(env->HasVar("PATH"));
}
TEST_F(EnvironmentTest, SetVar) {
- scoped_ptr<Environment> env(Environment::Create());
+ std::unique_ptr<Environment> env(Environment::Create());
const char kFooUpper[] = "FOO";
const char kFooLower[] = "foo";
@@ -70,7 +72,7 @@ TEST_F(EnvironmentTest, SetVar) {
}
TEST_F(EnvironmentTest, UnSetVar) {
- scoped_ptr<Environment> env(Environment::Create());
+ std::unique_ptr<Environment> env(Environment::Create());
const char kFooUpper[] = "FOO";
const char kFooLower[] = "foo";
@@ -128,7 +130,7 @@ TEST_F(EnvironmentTest, AlterEnvironment) {
const char* const empty[] = { NULL };
const char* const a2[] = { "A=2", NULL };
EnvironmentMap changes;
- scoped_ptr<char*[]> e;
+ std::unique_ptr<char* []> e;
e = AlterEnvironment(empty, changes);
EXPECT_TRUE(e[0] == NULL);
« no previous file with comments | « base/environment.cc ('k') | base/feature_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698