| Index: base/values_unittest.cc
|
| diff --git a/base/values_unittest.cc b/base/values_unittest.cc
|
| index 61e754e3d23f30bb3dd6b6a9b746790386d7f43f..b52881c2b8b19d0aab1a2e88fdade01a5fe3f047 100644
|
| --- a/base/values_unittest.cc
|
| +++ b/base/values_unittest.cc
|
| @@ -62,9 +62,9 @@ TEST(ValuesTest, Basic) {
|
|
|
| TEST(ValuesTest, List) {
|
| std::unique_ptr<ListValue> mixed_list(new ListValue());
|
| - mixed_list->Set(0, MakeUnique<FundamentalValue>(true));
|
| - mixed_list->Set(1, MakeUnique<FundamentalValue>(42));
|
| - mixed_list->Set(2, MakeUnique<FundamentalValue>(88.8));
|
| + mixed_list->Set(0, MakeUnique<Value>(true));
|
| + mixed_list->Set(1, MakeUnique<Value>(42));
|
| + mixed_list->Set(2, MakeUnique<Value>(88.8));
|
| mixed_list->Set(3, MakeUnique<StringValue>("foo"));
|
| ASSERT_EQ(4u, mixed_list->GetSize());
|
|
|
| @@ -100,8 +100,8 @@ TEST(ValuesTest, List) {
|
| ASSERT_EQ("foo", string_value);
|
|
|
| // Try searching in the mixed list.
|
| - base::FundamentalValue sought_value(42);
|
| - base::FundamentalValue not_found_value(false);
|
| + base::Value sought_value(42);
|
| + base::Value not_found_value(false);
|
|
|
| ASSERT_NE(mixed_list->end(), mixed_list->Find(sought_value));
|
| ASSERT_TRUE((*mixed_list->Find(sought_value))->GetAsInteger(&int_value));
|
| @@ -400,14 +400,14 @@ TEST(ValuesTest, DeepCopy) {
|
| std::unique_ptr<Value> scoped_null = Value::CreateNullValue();
|
| Value* original_null = scoped_null.get();
|
| original_dict.Set("null", std::move(scoped_null));
|
| - std::unique_ptr<FundamentalValue> scoped_bool(new FundamentalValue(true));
|
| - FundamentalValue* original_bool = scoped_bool.get();
|
| + std::unique_ptr<Value> scoped_bool(new Value(true));
|
| + Value* original_bool = scoped_bool.get();
|
| original_dict.Set("bool", std::move(scoped_bool));
|
| - std::unique_ptr<FundamentalValue> scoped_int(new FundamentalValue(42));
|
| - FundamentalValue* original_int = scoped_int.get();
|
| + std::unique_ptr<Value> scoped_int(new Value(42));
|
| + Value* original_int = scoped_int.get();
|
| original_dict.Set("int", std::move(scoped_int));
|
| - std::unique_ptr<FundamentalValue> scoped_double(new FundamentalValue(3.14));
|
| - FundamentalValue* original_double = scoped_double.get();
|
| + std::unique_ptr<Value> scoped_double(new Value(3.14));
|
| + Value* original_double = scoped_double.get();
|
| original_dict.Set("double", std::move(scoped_double));
|
| std::unique_ptr<StringValue> scoped_string(new StringValue("hello"));
|
| StringValue* original_string = scoped_string.get();
|
| @@ -426,12 +426,12 @@ TEST(ValuesTest, DeepCopy) {
|
|
|
| std::unique_ptr<ListValue> scoped_list(new ListValue());
|
| Value* original_list = scoped_list.get();
|
| - std::unique_ptr<FundamentalValue> scoped_list_element_0(
|
| - new FundamentalValue(0));
|
| + std::unique_ptr<Value> scoped_list_element_0(
|
| + new Value(0));
|
| Value* original_list_element_0 = scoped_list_element_0.get();
|
| scoped_list->Append(std::move(scoped_list_element_0));
|
| - std::unique_ptr<FundamentalValue> scoped_list_element_1(
|
| - new FundamentalValue(1));
|
| + std::unique_ptr<Value> scoped_list_element_1(
|
| + new Value(1));
|
| Value* original_list_element_1 = scoped_list_element_1.get();
|
| scoped_list->Append(std::move(scoped_list_element_1));
|
| original_dict.Set("list", std::move(scoped_list));
|
| @@ -557,7 +557,7 @@ TEST(ValuesTest, Equals) {
|
| EXPECT_NE(null1.get(), null2.get());
|
| EXPECT_TRUE(null1->Equals(null2.get()));
|
|
|
| - FundamentalValue boolean(false);
|
| + Value boolean(false);
|
| EXPECT_FALSE(null1->Equals(&boolean));
|
|
|
| DictionaryValue dv;
|
| @@ -582,7 +582,7 @@ TEST(ValuesTest, Equals) {
|
| copy->Set("f", std::move(list_copy));
|
| EXPECT_TRUE(dv.Equals(copy.get()));
|
|
|
| - original_list->Append(MakeUnique<FundamentalValue>(true));
|
| + original_list->Append(MakeUnique<Value>(true));
|
| EXPECT_FALSE(dv.Equals(copy.get()));
|
|
|
| // Check if Equals detects differences in only the keys.
|
| @@ -599,9 +599,9 @@ TEST(ValuesTest, StaticEquals) {
|
| EXPECT_TRUE(Value::Equals(null1.get(), null2.get()));
|
| EXPECT_TRUE(Value::Equals(NULL, NULL));
|
|
|
| - std::unique_ptr<Value> i42(new FundamentalValue(42));
|
| - std::unique_ptr<Value> j42(new FundamentalValue(42));
|
| - std::unique_ptr<Value> i17(new FundamentalValue(17));
|
| + std::unique_ptr<Value> i42(new Value(42));
|
| + std::unique_ptr<Value> j42(new Value(42));
|
| + std::unique_ptr<Value> i17(new Value(17));
|
| EXPECT_TRUE(Value::Equals(i42.get(), i42.get()));
|
| EXPECT_TRUE(Value::Equals(j42.get(), i42.get()));
|
| EXPECT_TRUE(Value::Equals(i42.get(), j42.get()));
|
| @@ -621,13 +621,13 @@ TEST(ValuesTest, DeepCopyCovariantReturnTypes) {
|
| std::unique_ptr<Value> scoped_null(Value::CreateNullValue());
|
| Value* original_null = scoped_null.get();
|
| original_dict.Set("null", std::move(scoped_null));
|
| - std::unique_ptr<FundamentalValue> scoped_bool(new FundamentalValue(true));
|
| + std::unique_ptr<Value> scoped_bool(new Value(true));
|
| Value* original_bool = scoped_bool.get();
|
| original_dict.Set("bool", std::move(scoped_bool));
|
| - std::unique_ptr<FundamentalValue> scoped_int(new FundamentalValue(42));
|
| + std::unique_ptr<Value> scoped_int(new Value(42));
|
| Value* original_int = scoped_int.get();
|
| original_dict.Set("int", std::move(scoped_int));
|
| - std::unique_ptr<FundamentalValue> scoped_double(new FundamentalValue(3.14));
|
| + std::unique_ptr<Value> scoped_double(new Value(3.14));
|
| Value* original_double = scoped_double.get();
|
| original_dict.Set("double", std::move(scoped_double));
|
| std::unique_ptr<StringValue> scoped_string(new StringValue("hello"));
|
| @@ -647,11 +647,11 @@ TEST(ValuesTest, DeepCopyCovariantReturnTypes) {
|
|
|
| std::unique_ptr<ListValue> scoped_list(new ListValue());
|
| Value* original_list = scoped_list.get();
|
| - std::unique_ptr<FundamentalValue> scoped_list_element_0(
|
| - new FundamentalValue(0));
|
| + std::unique_ptr<Value> scoped_list_element_0(
|
| + new Value(0));
|
| scoped_list->Append(std::move(scoped_list_element_0));
|
| - std::unique_ptr<FundamentalValue> scoped_list_element_1(
|
| - new FundamentalValue(1));
|
| + std::unique_ptr<Value> scoped_list_element_1(
|
| + new Value(1));
|
| scoped_list->Append(std::move(scoped_list_element_1));
|
| original_dict.Set("list", std::move(scoped_list));
|
|
|
| @@ -874,9 +874,9 @@ TEST(ValuesTest, GetWithNullOutValue) {
|
| DictionaryValue main_dict;
|
| ListValue main_list;
|
|
|
| - FundamentalValue bool_value(false);
|
| - FundamentalValue int_value(1234);
|
| - FundamentalValue double_value(12.34567);
|
| + Value bool_value(false);
|
| + Value int_value(1234);
|
| + Value double_value(12.34567);
|
| StringValue string_value("foo");
|
| BinaryValue binary_value;
|
| DictionaryValue dict_value;
|
|
|