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

Side by Side Diff: tools/json_schema_compiler/dart_generator_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 unified diff | Download patch
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 import os 6 import os
7 import sys 7 import sys
8 import unittest 8 import unittest
9 import glob
10 9
11 from dart_generator import DartGenerator
12 from compiler import GenerateSchema 10 from compiler import GenerateSchema
13 11
14 # If --rebase is passed to this test, this is set to True, indicating the test 12 # If --rebase is passed to this test, this is set to True, indicating the test
15 # output should be re-generated for each test (rather than running the tests 13 # output should be re-generated for each test (rather than running the tests
16 # themselves). 14 # themselves).
17 REBASE_MODE = False 15 REBASE_MODE = False
18 16
19 # The directory containing the input and expected output files corresponding 17 # The directory containing the input and expected output files corresponding
20 # to each test name. 18 # to each test name.
21 TESTS_DIR = 'dart_test' 19 TESTS_DIR = 'dart_test'
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 def testDictionaries(self): 54 def testDictionaries(self):
57 self._RunTest('dictionaries') 55 self._RunTest('dictionaries')
58 56
59 def testEmptyNamespace(self): 57 def testEmptyNamespace(self):
60 self._RunTest('empty_namespace') 58 self._RunTest('empty_namespace')
61 59
62 def testEmptyType(self): 60 def testEmptyType(self):
63 self._RunTest('empty_type') 61 self._RunTest('empty_type')
64 62
65 def testEvents(self): 63 def testEvents(self):
66 self._RunTest('enums')
67
68 def testEvents(self):
69 self._RunTest('events') 64 self._RunTest('events')
70 65
71 def testBasicFunction(self): 66 def testBasicFunction(self):
72 self._RunTest('functions') 67 self._RunTest('functions')
73 68
74 def testOpratableType(self): 69 def testOpratableType(self):
75 self._RunTest('operatable_type') 70 self._RunTest('operatable_type')
76 71
77 def testTags(self): 72 def testTags(self):
78 self._RunTest('tags') 73 self._RunTest('tags')
79 74
75
80 if __name__ == '__main__': 76 if __name__ == '__main__':
81 if '--rebase' in sys.argv: 77 if '--rebase' in sys.argv:
82 print "Running in rebase mode." 78 print "Running in rebase mode."
83 REBASE_MODE = True 79 REBASE_MODE = True
84 sys.argv.remove('--rebase') 80 sys.argv.remove('--rebase')
85 unittest.main() 81 unittest.main()
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/dart_generator.py ('k') | tools/json_schema_compiler/dart_test/enums.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698