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

Unified Diff: tools/json_schema_compiler/idl_schema_test.py

Issue 11826020: IDL schema compiler: Fixed pseudo-random order (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Updated test suite to test the correct ordering. Created 7 years, 11 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
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 a4fd0d859aca3e1c490b3bfeecde0a27effe3343..23843225d9833118f6803cd5e6589a2432951884 100755
--- a/tools/json_schema_compiler/idl_schema_test.py
+++ b/tools/json_schema_compiler/idl_schema_test.py
@@ -60,9 +60,18 @@ class IdlSchemaTest(unittest.TestCase):
self.assertEquals({
'x': {'name': 'x', 'type': 'integer', 'enum': [1,2],
'description': 'This comment tests "double-quotes".'},
- 'y': {'name': 'y', 'type': 'string'}},
+ 'y': {'name': 'y', 'type': 'string'},
+ 'z': {'name': 'z', 'type': 'string'},
+ 'a': {'name': 'a', 'type': 'string'},
+ 'b': {'name': 'b', 'type': 'string'},
+ 'c': {'name': 'c', 'type': 'string'}},
getType(self.idl_basics, 'idl_basics.MyType1')['properties'])
+ def testMemberOrdering(self):
+ self.assertEquals(
+ ['x', 'y', 'z', 'a', 'b', 'c'],
+ getType(self.idl_basics, 'idl_basics.MyType1')['properties'].keys())
+
def testEnum(self):
schema = self.idl_basics
expected = {'enum': ['name1', 'name2'], 'description': 'Enum description',

Powered by Google App Engine
This is Rietveld 408576698