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

Side by Side Diff: mojo/public/bindings/pylib/parse/mojo_parser_unittest.py

Issue 221953005: Mojo: Mojom: Add basic lexer tests, and remove hex float constants. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | « mojo/public/bindings/pylib/parse/mojo_parser.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import mojo_lexer 5 import mojo_lexer
6 import mojo_parser 6 import mojo_parser
7 import unittest 7 import unittest
8 8
9 9
10 class MojoParserTest(unittest.TestCase): 10 class MojoParserTest(unittest.TestCase):
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 source5 = """\ 220 source5 = """\
221 module my_module { struct MyStruct { int32 a_hex @0X0; }; } 221 module my_module { struct MyStruct { int32 a_hex @0X0; }; }
222 """ 222 """
223 with self.assertRaisesRegexp( 223 with self.assertRaisesRegexp(
224 mojo_lexer.LexError, 224 mojo_lexer.LexError,
225 r"^my_file\.mojom:1: Error: " 225 r"^my_file\.mojom:1: Error: "
226 r"Octal and hexadecimal ordinal values not allowed$"): 226 r"Octal and hexadecimal ordinal values not allowed$"):
227 mojo_parser.Parse(source5, "my_file.mojom") 227 mojo_parser.Parse(source5, "my_file.mojom")
228 228
229
229 if __name__ == "__main__": 230 if __name__ == "__main__":
230 unittest.main() 231 unittest.main()
OLDNEW
« no previous file with comments | « mojo/public/bindings/pylib/parse/mojo_parser.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698