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

Side by Side Diff: tools/json_schema_compiler/json_schema_test.py

Issue 10435003: Add support for 'nocompile' to IDL schema compiler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fixes, and rebased Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/json_schema_compiler/json_schema.py ('k') | tools/json_schema_compiler/model.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 from json_schema import CachedLoad 6 import json_schema
7 import json_schema_test 7 import json_schema_test
8 import unittest 8 import unittest
9 9
10 class JsonSchemaUnittest(unittest.TestCase): 10 class JsonSchemaUnittest(unittest.TestCase):
11 def testNocompile(self): 11 def testNocompile(self):
12 compiled = [ 12 compiled = [
13 { 13 {
14 "namespace": "compile", 14 "namespace": "compile",
15 "functions": [], 15 "functions": [],
16 "types": {} 16 "types": {}
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 }, 65 },
66 "four": { 66 "four": {
67 "key": "value" 67 "key": "value"
68 } 68 }
69 } 69 }
70 } 70 }
71 } 71 }
72 } 72 }
73 ] 73 ]
74 74
75 self.assertEquals(compiled, CachedLoad('test/json_schema_test.json')) 75 schema = json_schema.CachedLoad('test/json_schema_test.json')
76 self.assertEquals(compiled, json_schema.DeleteNocompileNodes(schema))
76 77
77 if __name__ == '__main__': 78 if __name__ == '__main__':
78 unittest.main() 79 unittest.main()
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/json_schema.py ('k') | tools/json_schema_compiler/model.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698