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

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

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 9 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
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 std::unique_ptr<base::Value> param(new base::StringValue("asdf")); 41 std::unique_ptr<base::Value> param(new base::StringValue("asdf"));
42 params_value->Append(param->CreateDeepCopy()); 42 params_value->Append(param->CreateDeepCopy());
43 std::unique_ptr<OptionalAny::Params> params( 43 std::unique_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 std::unique_ptr<base::ListValue> params_value(new base::ListValue()); 50 std::unique_ptr<base::ListValue> params_value(new base::ListValue());
51 std::unique_ptr<base::Value> param(new base::FundamentalValue(true)); 51 std::unique_ptr<base::Value> param(new base::Value(true));
52 params_value->Append(param->CreateDeepCopy()); 52 params_value->Append(param->CreateDeepCopy());
53 std::unique_ptr<OptionalAny::Params> params( 53 std::unique_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
« no previous file with comments | « tools/json_schema_compiler/cc_generator.py ('k') | tools/json_schema_compiler/test/arrays_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698