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

Unified Diff: tools/json_schema_compiler/idl_schema_test.py

Issue 23549025: Clean up JSON Schema Compiler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed enum test and added blank lines. Created 7 years, 3 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/idl_schema.py ('k') | tools/json_schema_compiler/json_parse.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/idl_schema_test.py
diff --git a/tools/json_schema_compiler/idl_schema_test.py b/tools/json_schema_compiler/idl_schema_test.py
index 6adbbd7e2889e6767f0331c5b3d4770103822877..1f5d7d67ec24ce114fc96654c0077378895865db 100755
--- a/tools/json_schema_compiler/idl_schema_test.py
+++ b/tools/json_schema_compiler/idl_schema_test.py
@@ -12,15 +12,18 @@ def getFunction(schema, name):
return item
raise KeyError('Missing function %s' % name)
+
def getParams(schema, name):
function = getFunction(schema, name)
return function['parameters']
+
def getType(schema, id):
for item in schema['types']:
if item['id'] == id:
return item
+
class IdlSchemaTest(unittest.TestCase):
def setUp(self):
loaded = idl_schema.Load('test/idl_basics.idl')
@@ -145,7 +148,7 @@ class IdlSchemaTest(unittest.TestCase):
enum_type = getType(schema, 'enum')
self.assertEquals(['callback', 'namespace'], enum_type['enum'])
- dictionary = getType(schema, 'dictionary');
+ dictionary = getType(schema, 'dictionary')
self.assertEquals('integer', dictionary['properties']['long']['type'])
mytype = getType(schema, 'MyType')
@@ -155,5 +158,6 @@ class IdlSchemaTest(unittest.TestCase):
self.assertEquals('Foo', params[0]['$ref'])
self.assertEquals('enum', params[1]['$ref'])
+
if __name__ == '__main__':
unittest.main()
« no previous file with comments | « tools/json_schema_compiler/idl_schema.py ('k') | tools/json_schema_compiler/json_parse.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698