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

Unified Diff: tools/json_schema_compiler/test/arrays_unittest.cc

Issue 383263005: Remove more CreateIntegerValue calls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/SetBoolean/SetInteger Created 6 years, 5 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
Index: tools/json_schema_compiler/test/arrays_unittest.cc
diff --git a/tools/json_schema_compiler/test/arrays_unittest.cc b/tools/json_schema_compiler/test/arrays_unittest.cc
index 817e51c27e64243e9ba5a426dc17db248af7772a..204f81aa80d39c6c0f0bb6b3fd42c05362f5facd 100644
--- a/tools/json_schema_compiler/test/arrays_unittest.cc
+++ b/tools/json_schema_compiler/test/arrays_unittest.cc
@@ -20,9 +20,9 @@ static scoped_ptr<base::DictionaryValue> CreateBasicArrayTypeDictionary() {
strings_value->Append(base::Value::CreateStringValue("c"));
strings_value->Append(base::Value::CreateStringValue("it's easy as"));
base::ListValue* integers_value = new base::ListValue();
- integers_value->Append(base::Value::CreateIntegerValue(1));
- integers_value->Append(base::Value::CreateIntegerValue(2));
- integers_value->Append(base::Value::CreateIntegerValue(3));
+ integers_value->Append(new base::FundamentalValue(1));
+ integers_value->Append(new base::FundamentalValue(2));
+ integers_value->Append(new base::FundamentalValue(3));
base::ListValue* booleans_value = new base::ListValue();
booleans_value->Append(base::Value::CreateBooleanValue(false));
booleans_value->Append(base::Value::CreateBooleanValue(true));
@@ -37,7 +37,7 @@ static scoped_ptr<base::DictionaryValue> CreateBasicArrayTypeDictionary() {
static base::Value* CreateItemValue(int val) {
base::DictionaryValue* value(new base::DictionaryValue());
- value->Set("val", base::Value::CreateIntegerValue(val));
+ value->Set("val", new base::FundamentalValue(val));
return value;
}
@@ -213,7 +213,7 @@ TEST(JsonSchemaCompilerArrayTest, RefArrayType) {
scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue());
scoped_ptr<base::ListValue> not_ref_array(new base::ListValue());
not_ref_array->Append(CreateItemValue(1));
- not_ref_array->Append(base::Value::CreateIntegerValue(3));
+ not_ref_array->Append(new base::FundamentalValue(3));
value->Set("refs", not_ref_array.release());
scoped_ptr<RefArrayType> ref_array_type(new RefArrayType());
EXPECT_FALSE(RefArrayType::Populate(*value, ref_array_type.get()));
@@ -223,9 +223,9 @@ TEST(JsonSchemaCompilerArrayTest, RefArrayType) {
TEST(JsonSchemaCompilerArrayTest, IntegerArrayParamsCreate) {
scoped_ptr<base::ListValue> params_value(new base::ListValue());
scoped_ptr<base::ListValue> integer_array(new base::ListValue());
- integer_array->Append(base::Value::CreateIntegerValue(2));
- integer_array->Append(base::Value::CreateIntegerValue(4));
- integer_array->Append(base::Value::CreateIntegerValue(8));
+ integer_array->Append(new base::FundamentalValue(2));
+ integer_array->Append(new base::FundamentalValue(4));
+ integer_array->Append(new base::FundamentalValue(8));
params_value->Append(integer_array.release());
scoped_ptr<IntegerArray::Params> params(
IntegerArray::Params::Create(*params_value));
@@ -239,7 +239,7 @@ TEST(JsonSchemaCompilerArrayTest, IntegerArrayParamsCreate) {
TEST(JsonSchemaCompilerArrayTest, AnyArrayParamsCreate) {
scoped_ptr<base::ListValue> params_value(new base::ListValue());
scoped_ptr<base::ListValue> any_array(new base::ListValue());
- any_array->Append(base::Value::CreateIntegerValue(1));
+ any_array->Append(new base::FundamentalValue(1));
any_array->Append(base::Value::CreateStringValue("test"));
any_array->Append(CreateItemValue(2));
params_value->Append(any_array.release());
@@ -289,8 +289,8 @@ TEST(JsonSchemaCompilerArrayTest, ReturnIntegerArrayResultCreate) {
base::ListValue expected;
base::ListValue* expected_argument = new base::ListValue();
- expected_argument->Append(base::Value::CreateIntegerValue(1));
- expected_argument->Append(base::Value::CreateIntegerValue(2));
+ expected_argument->Append(new base::FundamentalValue(1));
+ expected_argument->Append(new base::FundamentalValue(2));
expected.Append(expected_argument);
EXPECT_TRUE(results->Equals(&expected));
}

Powered by Google App Engine
This is Rietveld 408576698