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

Unified Diff: tools/json_schema_compiler/cpp_type_generator.py

Issue 9866050: Update expectations in a json_schema_compiler unit test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed new problems from crrev.com/129251 Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/json_schema_compiler/cpp_type_generator_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/cpp_type_generator.py
diff --git a/tools/json_schema_compiler/cpp_type_generator.py b/tools/json_schema_compiler/cpp_type_generator.py
index 9609f3529fb5fee970061926454b11ffa8bf8b87..04e008051368f5e67974a04463ea715b70428c08 100644
--- a/tools/json_schema_compiler/cpp_type_generator.py
+++ b/tools/json_schema_compiler/cpp_type_generator.py
@@ -32,7 +32,7 @@ class CppTypeGenerator(object):
if qualified_name in self._type_namespaces:
raise ValueError('Type %s is declared in both %s and %s' %
(qualified_name, namespace.name,
- self._type_namespaces[qualified_type].name))
+ self._type_namespaces[qualified_name].name))
self._type_namespaces[qualified_name] = namespace
self._cpp_namespaces[namespace] = cpp_namespace
@@ -213,7 +213,7 @@ class CppTypeGenerator(object):
if type_name == self._QualifyName(namespace, ref_type):
return namespace
- raise ValueError('Cannot resolve %s to a type in any namespace.' % ref_type)
+ return None
def _NamespaceTypeDependencies(self):
"""Returns a dict containing a mapping of model.Namespace to the C++ type
« no previous file with comments | « no previous file | tools/json_schema_compiler/cpp_type_generator_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698