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() |