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

Side by Side Diff: tools/json_schema_compiler/test/crossref_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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/json_schema_compiler/test/simple_api.h" 5 #include "tools/json_schema_compiler/test/simple_api.h"
6 #include "tools/json_schema_compiler/test/crossref.h" 6 #include "tools/json_schema_compiler/test/crossref.h"
7 7
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 using namespace test::api::crossref; 10 using namespace test::api::crossref;
11 11
12 namespace { 12 namespace {
13 13
14 static scoped_ptr<base::DictionaryValue> CreateTestTypeDictionary() { 14 static scoped_ptr<base::DictionaryValue> CreateTestTypeDictionary() {
15 base::DictionaryValue* value(new base::DictionaryValue()); 15 base::DictionaryValue* value(new base::DictionaryValue());
16 value->SetWithoutPathExpansion("number", base::Value::CreateDoubleValue(1.1)); 16 value->SetWithoutPathExpansion("number", base::Value::CreateDoubleValue(1.1));
17 value->SetWithoutPathExpansion("integer", base::Value::CreateIntegerValue(4)); 17 value->SetWithoutPathExpansion("integer", new base::FundamentalValue(4));
18 value->SetWithoutPathExpansion("string", 18 value->SetWithoutPathExpansion("string",
19 base::Value::CreateStringValue("bling")); 19 base::Value::CreateStringValue("bling"));
20 value->SetWithoutPathExpansion("boolean", 20 value->SetWithoutPathExpansion("boolean",
21 base::Value::CreateBooleanValue(true)); 21 base::Value::CreateBooleanValue(true));
22 return scoped_ptr<base::DictionaryValue>(value); 22 return scoped_ptr<base::DictionaryValue>(value);
23 } 23 }
24 24
25 } // namespace 25 } // namespace
26 26
27 TEST(JsonSchemaCompilerCrossrefTest, CrossrefTypePopulate) { 27 TEST(JsonSchemaCompilerCrossrefTest, CrossrefTypePopulate) {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 scoped_ptr<base::ListValue> params_value(new base::ListValue()); 115 scoped_ptr<base::ListValue> params_value(new base::ListValue());
116 scoped_ptr<base::DictionaryValue> param_object_value( 116 scoped_ptr<base::DictionaryValue> param_object_value(
117 new base::DictionaryValue()); 117 new base::DictionaryValue());
118 param_object_value->Set("testType", CreateTestTypeDictionary().release()); 118 param_object_value->Set("testType", CreateTestTypeDictionary().release());
119 params_value->Append(param_object_value.release()); 119 params_value->Append(param_object_value.release());
120 scoped_ptr<TestTypeInObject::Params> params( 120 scoped_ptr<TestTypeInObject::Params> params(
121 TestTypeInObject::Params::Create(*params_value)); 121 TestTypeInObject::Params::Create(*params_value));
122 EXPECT_FALSE(params.get()); 122 EXPECT_FALSE(params.get());
123 } 123 }
124 } 124 }
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/test/choices_unittest.cc ('k') | tools/json_schema_compiler/test/functions_on_types_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698