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

Side by Side Diff: lib/dom/scripts/dartgenerator_test.py

Issue 10880068: - Change "static final" to "static const" in the lib/ directory. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « lib/dom/dom.dart ('k') | lib/dom/scripts/idlparser.dart » ('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/python 1 #!/usr/bin/python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """Tests for dartgenerator.""" 6 """Tests for dartgenerator."""
7 7
8 import logging.config 8 import logging.config
9 import os.path 9 import os.path
10 import re 10 import re
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 'interface Rectangle extends Forma') 193 'interface Rectangle extends Forma')
194 194
195 def testQualifiedDartTypes(self): 195 def testQualifiedDartTypes(self):
196 self._database.Load() 196 self._database.Load()
197 self._generator.FilterMembersWithUnidentifiedTypes(self._database) 197 self._generator.FilterMembersWithUnidentifiedTypes(self._database)
198 self._generator.Generate(self._database, self._output_dir) 198 self._generator.Generate(self._database, self._output_dir)
199 self._generator.Flush() 199 self._generator.Flush()
200 200
201 # Verify primitive conversions are working: 201 # Verify primitive conversions are working:
202 self._AssertOutputContains('Shape', 202 self._AssertOutputContains('Shape',
203 'static final int CONSTANT = 1') 203 'static const int CONSTANT = 1')
204 self._AssertOutputContains('Shape', 204 self._AssertOutputContains('Shape',
205 'final String strAttr;') 205 'final String strAttr;')
206 206
207 # Verify interface names are converted: 207 # Verify interface names are converted:
208 self._AssertOutputContains('Shape', 208 self._AssertOutputContains('Shape',
209 'interface Shape {') 209 'interface Shape {')
210 self._AssertOutputContains('Shape', 210 self._AssertOutputContains('Shape',
211 ' Shape create();') 211 ' Shape create();')
212 # TODO(sra): Why is this broken? Output contains qualified type. 212 # TODO(sra): Why is this broken? Output contains qualified type.
213 #self._AssertOutputContains('Shape', 213 #self._AssertOutputContains('Shape',
(...skipping 15 matching lines...) Expand all
229 # Verify template conversion: 229 # Verify template conversion:
230 # TODO(vsm): Re-enable when core collections are supported. 230 # TODO(vsm): Re-enable when core collections are supported.
231 # self._AssertOutputContains('rectangles', 'Rectangle', 231 # self._AssertOutputContains('rectangles', 'Rectangle',
232 # 'void someTemplatedType(List<Shape> list)') 232 # 'void someTemplatedType(List<Shape> list)')
233 233
234 234
235 if __name__ == '__main__': 235 if __name__ == '__main__':
236 logging.config.fileConfig('logging.conf') 236 logging.config.fileConfig('logging.conf')
237 if __name__ == '__main__': 237 if __name__ == '__main__':
238 unittest.main() 238 unittest.main()
OLDNEW
« no previous file with comments | « lib/dom/dom.dart ('k') | lib/dom/scripts/idlparser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698