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

Unified Diff: tools/json_schema_compiler/test/enums_unittest.cc

Issue 11827026: Overhaul JSON Schema Compiler to support a number of features required to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: tools/json_schema_compiler/test/enums_unittest.cc
diff --git a/tools/json_schema_compiler/test/enums_unittest.cc b/tools/json_schema_compiler/test/enums_unittest.cc
index 4604694e9cb66b8d8731c49944360398cee9fc71..81bfe8da19c89c822df8cc4761172e4633910f56 100644
--- a/tools/json_schema_compiler/test/enums_unittest.cc
+++ b/tools/json_schema_compiler/test/enums_unittest.cc
@@ -33,10 +33,10 @@ TEST(JsonSchemaCompilerEnumsTest, EnumsAsTypes) {
scoped_ptr<TakesEnumAsType::Params> params(
TakesEnumAsType::Params::Create(args));
ASSERT_TRUE(params.get());
- EXPECT_EQ(ENUMS_ENUMERATION_ONE, params->enumeration);
+ EXPECT_EQ(ENUMERATION_ONE, params->enumeration);
EXPECT_TRUE(args.Equals(ReturnsEnumAsType::Results::Create(
- ENUMS_ENUMERATION_ONE).get()));
+ ENUMERATION_ONE).get()));
}
{
HasEnumeration enumeration;
@@ -56,7 +56,8 @@ TEST(JsonSchemaCompilerEnumsTest, EnumsAsTypes) {
TEST(JsonSchemaCompilerEnumsTest, ReturnsEnumCreate) {
{
ReturnsEnum::Results::State state = ReturnsEnum::Results::STATE_FOO;
- scoped_ptr<Value> result = ReturnsEnum::Results::CreateEnumValue(state);
+ scoped_ptr<Value> result(
+ new base::StringValue(ReturnsEnum::Results::ToString(state)));
scoped_ptr<Value> expected(Value::CreateStringValue("foo"));
EXPECT_TRUE(result->Equals(expected.get()));
}
@@ -189,7 +190,8 @@ TEST(JsonSchemaCompilerEnumsTest, TakesMultipleOptionalEnumsParamsCreate) {
TEST(JsonSchemaCompilerEnumsTest, OnEnumFiredCreate) {
{
OnEnumFired::SomeEnum some_enum = OnEnumFired::SOME_ENUM_FOO;
- scoped_ptr<Value> result(OnEnumFired::CreateEnumValue(some_enum));
+ scoped_ptr<Value> result(
+ new base::StringValue(OnEnumFired::ToString(some_enum)));
scoped_ptr<Value> expected(Value::CreateStringValue("foo"));
EXPECT_TRUE(result->Equals(expected.get()));
}
« no previous file with comments | « tools/json_schema_compiler/test/enums.json ('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