| Index: tools/json_schema_compiler/test/choices_unittest.cc
|
| diff --git a/tools/json_schema_compiler/test/choices_unittest.cc b/tools/json_schema_compiler/test/choices_unittest.cc
|
| index dcdfd77c060a7a69521fe2f3b90ffc231d6f0129..ce5a0ee17ad3ba4adfb3458c8a48574a79827ff5 100644
|
| --- a/tools/json_schema_compiler/test/choices_unittest.cc
|
| +++ b/tools/json_schema_compiler/test/choices_unittest.cc
|
| @@ -116,20 +116,20 @@ TEST(JsonSchemaCompilerChoicesTest, ReturnChoices) {
|
| std::vector<int> integers;
|
| integers.push_back(1);
|
| integers.push_back(2);
|
| - scoped_ptr<Value> array_result(ReturnChoices::Result::Create(integers));
|
| - ListValue* list = NULL;
|
| - EXPECT_TRUE(array_result->GetAsList(&list));
|
| - EXPECT_EQ((size_t) 2, list->GetSize());
|
| - int temp;
|
| - EXPECT_TRUE(list->GetInteger(0, &temp));
|
| - EXPECT_EQ(1, temp);
|
| - EXPECT_TRUE(list->GetInteger(1, &temp));
|
| - EXPECT_EQ(2, temp);
|
| + scoped_ptr<ListValue> array_results =
|
| + ReturnChoices::Results::Create(integers);
|
| +
|
| + ListValue expected;
|
| + ListValue* expected_argument = new ListValue();
|
| + expected_argument->Append(Value::CreateIntegerValue(1));
|
| + expected_argument->Append(Value::CreateIntegerValue(2));
|
| + expected.Append(expected_argument);
|
| + EXPECT_TRUE(array_results->Equals(&expected));
|
| }
|
| {
|
| - scoped_ptr<Value> single_result(ReturnChoices::Result::Create(5));
|
| - int temp;
|
| - EXPECT_TRUE(single_result->GetAsInteger(&temp));
|
| - EXPECT_EQ(5, temp);
|
| + scoped_ptr<ListValue> integer_results = ReturnChoices::Results::Create(5);
|
| + ListValue expected;
|
| + expected.Append(Value::CreateIntegerValue(5));
|
| + EXPECT_TRUE(integer_results->Equals(&expected));
|
| }
|
| }
|
|
|