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

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

Issue 1128523003: Add support for passing errors through PopulateArrayFromList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated JSON schema tests. Created 5 years, 7 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
« no previous file with comments | « tools/json_schema_compiler/cc_generator.py ('k') | tools/json_schema_compiler/util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/test/error_generation_unittest.cc
diff --git a/tools/json_schema_compiler/test/error_generation_unittest.cc b/tools/json_schema_compiler/test/error_generation_unittest.cc
index 42f95760a64825d13a79b4477ca6191bda622335..904b6c9739ab7bd852fc52fb35970a0e0cd89205 100644
--- a/tools/json_schema_compiler/test/error_generation_unittest.cc
+++ b/tools/json_schema_compiler/test/error_generation_unittest.cc
@@ -170,7 +170,8 @@ TEST(JsonSchemaCompilerErrorTest, UnableToPopulateArray) {
scoped_ptr<base::ListValue> params_value = List(
new FundamentalValue(5),
new FundamentalValue(false));
- EXPECT_TRUE(EqualsUtf16("unable to populate array 'integers'",
+ EXPECT_TRUE(EqualsUtf16(
+ "expected integer, got boolean; unable to populate array 'integers'",
GetPopulateError<ChoiceType::Integers>(*params_value)));
}
}
@@ -294,7 +295,8 @@ TEST(JsonSchemaCompilerErrorTest, OptionalUnableToPopulateArray) {
base::string16 error;
EXPECT_TRUE(OptionalChoiceType::Integers::Populate(*params_value, &out,
&error));
- EXPECT_TRUE(EqualsUtf16("unable to populate array 'integers'",
+ EXPECT_TRUE(EqualsUtf16(
+ "expected integer, got boolean; unable to populate array 'integers'",
error));
EXPECT_EQ(NULL, out.as_integer.get());
}
« no previous file with comments | « tools/json_schema_compiler/cc_generator.py ('k') | tools/json_schema_compiler/util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698