Chromium Code Reviews| Index: tools/json_schema_compiler/test/features_generation_unittest.cc |
| diff --git a/tools/json_schema_compiler/test/features_generation_unittest.cc b/tools/json_schema_compiler/test/features_generation_unittest.cc |
| index 3b7e8e13ab961a60012495a2849c85cd8bd73c76..ab0b1cb561babd5303e2e50ebff62e95bad8c9ad 100644 |
| --- a/tools/json_schema_compiler/test/features_generation_unittest.cc |
| +++ b/tools/json_schema_compiler/test/features_generation_unittest.cc |
| @@ -96,6 +96,7 @@ TEST(FeaturesGenerationTest, FeaturesTest) { |
| CompilerTestFeatureProvider provider; |
| auto GetAPIFeature = [&provider](const std::string& name) { |
| + fprintf(stderr, "GetAPIFeature(\"%s\")\n", name.c_str()); |
|
tbarzic
2016/12/01 19:02:29
remove :)
krasin1
2016/12/01 20:41:12
Done.
|
| Feature* feature = provider.GetFeature(name); |
| // Shame we can't test this more safely, but if our feature is declared as |
| // the wrong class, things should blow up in a spectacular fashion. |
| @@ -287,12 +288,14 @@ TEST(FeaturesGenerationTest, FeaturesTest) { |
| comparator.CompareFeature(feature); |
| } |
| { |
| - Feature* feature = GetAPIFeature("complex_alias"); |
| + Feature* feature = |
| + static_cast<ComplexFeature*>(provider.GetFeature("complex_alias")); |
|
tbarzic
2016/12/01 19:02:29
I don't think cast is needed if provider.GetFeatur
krasin1
2016/12/01 20:41:13
Done.
|
| ASSERT_EQ("", feature->alias()); |
| ASSERT_EQ("complex_alias_source", feature->source()); |
| } |
| { |
| - Feature* feature = GetAPIFeature("complex_alias_source"); |
| + Feature* feature = static_cast<ComplexFeature*>( |
| + provider.GetFeature("complex_alias_source")); |
| ASSERT_EQ("complex_alias", feature->alias()); |
| ASSERT_EQ("", feature->source()); |
| } |