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

Unified Diff: mojo/public/tools/bindings/pylib/mojom_tests/parse/parser_unittest.py

Issue 282183003: Mojo: Fix mojom parser unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/tools/bindings/pylib/mojom/parse/parser.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/bindings/pylib/mojom_tests/parse/parser_unittest.py
diff --git a/mojo/public/tools/bindings/pylib/mojom_tests/parse/parser_unittest.py b/mojo/public/tools/bindings/pylib/mojom_tests/parse/parser_unittest.py
index 94b83f9b6271857abc93c67378e5eefc0b1e0f92..99a41e2fcaba22d2d016b9bd1b5a989dedc2fe4d 100644
--- a/mojo/public/tools/bindings/pylib/mojom_tests/parse/parser_unittest.py
+++ b/mojo/public/tools/bindings/pylib/mojom_tests/parse/parser_unittest.py
@@ -41,13 +41,13 @@ module my_module {
}
"""
self.assertEquals(parser.Parse(source, "my_file.mojom"),
- [("MODULE", "my_module", None)])
+ [("MODULE", "my_module", None, None)])
def testSourceWithCrLfs(self):
"""Tests a .mojom source with CR-LFs instead of LFs."""
source = "// This is a comment.\r\n\r\nmodule my_module {\r\n}\r\n"
self.assertEquals(parser.Parse(source, "my_file.mojom"),
- [("MODULE", "my_module", None)])
+ [("MODULE", "my_module", None, None)])
def testUnexpectedEOF(self):
"""Tests a "truncated" .mojom source."""
@@ -76,6 +76,7 @@ struct MyStruct {
expected = \
[('MODULE',
'my_module',
+ None,
[('STRUCT',
'MyStruct',
None,
@@ -94,6 +95,7 @@ struct MyStruct {
expected = \
[('MODULE',
'',
+ None,
[('STRUCT',
'MyStruct',
None,
@@ -154,6 +156,7 @@ enum MyEnum {
expected = \
[('MODULE',
'my_module',
+ None,
[('ENUM',
'MyEnum',
[('ENUM_FIELD', 'MY_ENUM_1', ('EXPRESSION', ['1'])),
@@ -223,6 +226,7 @@ struct MyStruct {
expected = \
[('MODULE',
'my_module',
+ None,
[('STRUCT',
'MyStruct',
None,
@@ -320,6 +324,7 @@ struct MyStruct {
expected = \
[('MODULE',
'my.mod',
+ None,
[('STRUCT',
'MyStruct',
None,
« no previous file with comments | « mojo/public/tools/bindings/pylib/mojom/parse/parser.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698