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

Side by Side Diff: tools/json_schema_compiler/test/simple_api_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
« no previous file with comments | « tools/json_schema_compiler/test/crossref_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 using namespace test::api::simple_api; 9 using namespace test::api::simple_api;
10 10
11 namespace { 11 namespace {
12 12
13 static scoped_ptr<base::DictionaryValue> CreateTestTypeDictionary() { 13 static scoped_ptr<base::DictionaryValue> CreateTestTypeDictionary() {
14 scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); 14 scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue());
15 value->SetWithoutPathExpansion("number", 15 value->SetWithoutPathExpansion("number", new base::FundamentalValue(1.1));
16 base::Value::CreateDoubleValue(1.1));
17 value->SetWithoutPathExpansion("integer", new base::FundamentalValue(4)); 16 value->SetWithoutPathExpansion("integer", new base::FundamentalValue(4));
18 value->SetWithoutPathExpansion("string", new base::StringValue("bling")); 17 value->SetWithoutPathExpansion("string", new base::StringValue("bling"));
19 value->SetWithoutPathExpansion("boolean", new base::FundamentalValue(true)); 18 value->SetWithoutPathExpansion("boolean", new base::FundamentalValue(true));
20 return value.Pass(); 19 return value.Pass();
21 } 20 }
22 21
23 } // namespace 22 } // namespace
24 23
25 TEST(JsonSchemaCompilerSimpleTest, IncrementIntegerResultCreate) { 24 TEST(JsonSchemaCompilerSimpleTest, IncrementIntegerResultCreate) {
26 scoped_ptr<base::ListValue> results = IncrementInteger::Results::Create(5); 25 scoped_ptr<base::ListValue> results = IncrementInteger::Results::Create(5);
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 ASSERT_TRUE(expected->GetInteger("integer", &some_test_type.integer)); 173 ASSERT_TRUE(expected->GetInteger("integer", &some_test_type.integer));
175 ASSERT_TRUE(expected->GetBoolean("boolean", &some_test_type.boolean)); 174 ASSERT_TRUE(expected->GetBoolean("boolean", &some_test_type.boolean));
176 175
177 scoped_ptr<base::ListValue> results( 176 scoped_ptr<base::ListValue> results(
178 OnTestTypeFired::Create(some_test_type)); 177 OnTestTypeFired::Create(some_test_type));
179 base::DictionaryValue* result = NULL; 178 base::DictionaryValue* result = NULL;
180 results->GetDictionary(0, &result); 179 results->GetDictionary(0, &result);
181 EXPECT_TRUE(result->Equals(expected.get())); 180 EXPECT_TRUE(result->Equals(expected.get()));
182 } 181 }
183 } 182 }
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/test/crossref_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698