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

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

Issue 397793002: Eliminate CreateBooleanValue from test files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad merge 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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 #include "tools/json_schema_compiler/test/any.h" 6 #include "tools/json_schema_compiler/test/any.h"
7 7
8 using namespace test::api::any; 8 using namespace test::api::any;
9 9
10 TEST(JsonSchemaCompilerAnyTest, AnyTypePopulate) { 10 TEST(JsonSchemaCompilerAnyTest, AnyTypePopulate) {
(...skipping 30 matching lines...) Expand all
41 scoped_ptr<base::Value> param(base::Value::CreateStringValue("asdf")); 41 scoped_ptr<base::Value> param(base::Value::CreateStringValue("asdf"));
42 params_value->Append(param->DeepCopy()); 42 params_value->Append(param->DeepCopy());
43 scoped_ptr<OptionalAny::Params> params( 43 scoped_ptr<OptionalAny::Params> params(
44 OptionalAny::Params::Create(*params_value)); 44 OptionalAny::Params::Create(*params_value));
45 ASSERT_TRUE(params); 45 ASSERT_TRUE(params);
46 ASSERT_TRUE(params->any_name); 46 ASSERT_TRUE(params->any_name);
47 EXPECT_TRUE(params->any_name->Equals(param.get())); 47 EXPECT_TRUE(params->any_name->Equals(param.get()));
48 } 48 }
49 { 49 {
50 scoped_ptr<base::ListValue> params_value(new base::ListValue()); 50 scoped_ptr<base::ListValue> params_value(new base::ListValue());
51 scoped_ptr<base::Value> param(base::Value::CreateBooleanValue(true)); 51 scoped_ptr<base::Value> param(new base::FundamentalValue(true));
52 params_value->Append(param->DeepCopy()); 52 params_value->Append(param->DeepCopy());
53 scoped_ptr<OptionalAny::Params> params( 53 scoped_ptr<OptionalAny::Params> params(
54 OptionalAny::Params::Create(*params_value)); 54 OptionalAny::Params::Create(*params_value));
55 ASSERT_TRUE(params); 55 ASSERT_TRUE(params);
56 ASSERT_TRUE(params->any_name); 56 ASSERT_TRUE(params->any_name);
57 EXPECT_TRUE(params->any_name->Equals(param.get())); 57 EXPECT_TRUE(params->any_name->Equals(param.get()));
58 } 58 }
59 } 59 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698