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

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

Issue 295973007: Mojo: Mojom: Change order of default values and ordinals. (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 5ef995b1d7499c63b72e162ed8385562ad87f009..be79c01d57db363ea4fdba2f3969aa0967983c7b 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
@@ -211,10 +211,10 @@ module my_module {
// This isn't actually valid .mojom, but the problem (missing ordinals) should
// be handled at a different level.
struct MyStruct {
- int32 a0 @0;
- int32 a1 @1;
- int32 a2 @2;
- int32 a9 @9;
+ int32 a0@0;
+ int32 a1@1;
+ int32 a2@2;
+ int32 a9@9;
int32 a10 @10;
int32 a11 @11;
int32 a29 @29;
@@ -246,7 +246,7 @@ struct MyStruct {
module my_module {
struct MyStruct {
- int32 a_missing @;
+ int32 a_missing@;
};
} // module my_module
@@ -260,7 +260,7 @@ struct MyStruct {
module my_module {
struct MyStruct {
- int32 a_octal @01;
+ int32 a_octal@01;
};
} // module my_module
@@ -272,7 +272,7 @@ struct MyStruct {
parser.Parse(source2, "my_file.mojom")
source3 = """\
-module my_module { struct MyStruct { int32 a_invalid_octal @08; }; }
+module my_module { struct MyStruct { int32 a_invalid_octal@08; }; }
"""
with self.assertRaisesRegexp(
lexer.LexError,
@@ -281,7 +281,7 @@ module my_module { struct MyStruct { int32 a_invalid_octal @08; }; }
parser.Parse(source3, "my_file.mojom")
source4 = """\
-module my_module { struct MyStruct { int32 a_hex @0x1aB9; }; }
+module my_module { struct MyStruct { int32 a_hex@0x1aB9; }; }
"""
with self.assertRaisesRegexp(
lexer.LexError,
@@ -290,7 +290,7 @@ module my_module { struct MyStruct { int32 a_hex @0x1aB9; }; }
parser.Parse(source4, "my_file.mojom")
source5 = """\
-module my_module { struct MyStruct { int32 a_hex @0X0; }; }
+module my_module { struct MyStruct { int32 a_hex@0X0; }; }
"""
with self.assertRaisesRegexp(
lexer.LexError,
@@ -300,14 +300,14 @@ module my_module { struct MyStruct { int32 a_hex @0X0; }; }
source6 = """\
struct MyStruct {
- int32 a_too_big @999999999999;
+ int32 a_too_big@999999999999;
};
"""
with self.assertRaisesRegexp(
parser.ParseError,
r"^my_file\.mojom:2: Error: "
r"Ordinal value 999999999999 too large:\n"
- r" int32 a_too_big @999999999999;$"):
+ r" int32 a_too_big@999999999999;$"):
parser.Parse(source6, "my_file.mojom")
def testNestedNamespace(self):
« 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