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

Unified Diff: dbus/values_util_unittest.cc

Issue 2037833003: Remove ListValue::Append(new {Fundamental,String}Value(...)) pattern in //dbus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/values_util_unittest.cc
diff --git a/dbus/values_util_unittest.cc b/dbus/values_util_unittest.cc
index 2156c15e409a6e3ea99a1c2aa19880fce0849301..8d04bcab876572fd5d92f93846fab47b14a7076a 100644
--- a/dbus/values_util_unittest.cc
+++ b/dbus/values_util_unittest.cc
@@ -204,7 +204,7 @@ TEST(ValuesUtilTest, PopIntArray) {
// Create the expected value.
std::unique_ptr<base::ListValue> list_value(new base::ListValue);
for (size_t i = 0; i != data.size(); ++i)
- list_value->Append(new base::FundamentalValue(data[i]));
+ list_value->AppendInteger(data[i]);
// Pop an int32_t array.
MessageReader reader(response.get());
@@ -227,7 +227,7 @@ TEST(ValuesUtilTest, PopStringArray) {
// Create the expected value.
std::unique_ptr<base::ListValue> list_value(new base::ListValue);
for (size_t i = 0; i != data.size(); ++i)
- list_value->Append(new base::StringValue(data[i]));
+ list_value->AppendString(data[i]);
// Pop a string array.
MessageReader reader(response.get());
@@ -254,10 +254,10 @@ TEST(ValuesUtilTest, PopStruct) {
// Create the expected value.
base::ListValue list_value;
- list_value.Append(new base::FundamentalValue(kBoolValue));
- list_value.Append(new base::FundamentalValue(kInt32Value));
- list_value.Append(new base::FundamentalValue(kDoubleValue));
- list_value.Append(new base::StringValue(kStringValue));
+ list_value.AppendBoolean(kBoolValue);
+ list_value.AppendInteger(kInt32Value);
+ list_value.AppendDouble(kDoubleValue);
+ list_value.AppendString(kStringValue);
// Pop a struct.
MessageReader reader(response.get());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698