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

Side by Side Diff: tools/json_schema_compiler/test/crossref_unittest.cc

Issue 390233003: Decrement CreateDoubleValue count (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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", new base::FundamentalValue(1.1));
17 value->SetWithoutPathExpansion("integer", new base::FundamentalValue(4)); 17 value->SetWithoutPathExpansion("integer", new base::FundamentalValue(4));
18 value->SetWithoutPathExpansion("string", new base::StringValue("bling")); 18 value->SetWithoutPathExpansion("string", new base::StringValue("bling"));
19 value->SetWithoutPathExpansion("boolean", new base::FundamentalValue(true)); 19 value->SetWithoutPathExpansion("boolean", new base::FundamentalValue(true));
20 return scoped_ptr<base::DictionaryValue>(value); 20 return scoped_ptr<base::DictionaryValue>(value);
21 } 21 }
22 22
23 } // namespace 23 } // namespace
24 24
25 TEST(JsonSchemaCompilerCrossrefTest, CrossrefTypePopulate) { 25 TEST(JsonSchemaCompilerCrossrefTest, CrossrefTypePopulate) {
26 scoped_ptr<CrossrefType> crossref_type(new CrossrefType()); 26 scoped_ptr<CrossrefType> crossref_type(new CrossrefType());
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 scoped_ptr<base::ListValue> params_value(new base::ListValue()); 112 scoped_ptr<base::ListValue> params_value(new base::ListValue());
113 scoped_ptr<base::DictionaryValue> param_object_value( 113 scoped_ptr<base::DictionaryValue> param_object_value(
114 new base::DictionaryValue()); 114 new base::DictionaryValue());
115 param_object_value->Set("testType", CreateTestTypeDictionary().release()); 115 param_object_value->Set("testType", CreateTestTypeDictionary().release());
116 params_value->Append(param_object_value.release()); 116 params_value->Append(param_object_value.release());
117 scoped_ptr<TestTypeInObject::Params> params( 117 scoped_ptr<TestTypeInObject::Params> params(
118 TestTypeInObject::Params::Create(*params_value)); 118 TestTypeInObject::Params::Create(*params_value));
119 EXPECT_FALSE(params.get()); 119 EXPECT_FALSE(params.get());
120 } 120 }
121 } 121 }
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/test/arrays_unittest.cc ('k') | tools/json_schema_compiler/test/simple_api_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698