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

Unified Diff: third_party/mojo/src/mojo/public/tools/bindings/pylib/mojom_tests/parse/translate_unittest.py

Issue 917433003: Update mojo sdk to rev 1027d24a1f68c6d10b7539b32114f1272b2cc9f1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add //build/module_args/mojo.gni. Created 5 years, 10 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 | « third_party/mojo/src/mojo/public/tools/bindings/pylib/mojom/parse/translate.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/mojo/src/mojo/public/tools/bindings/pylib/mojom_tests/parse/translate_unittest.py
diff --git a/third_party/mojo/src/mojo/public/tools/bindings/pylib/mojom_tests/parse/translate_unittest.py b/third_party/mojo/src/mojo/public/tools/bindings/pylib/mojom_tests/parse/translate_unittest.py
index 29dd906450797e9c206d2b6816c892c4bf8ef582..3f33409fc4f4ddaa5af54ebc7be21ac063a02781 100644
--- a/third_party/mojo/src/mojo/public/tools/bindings/pylib/mojom_tests/parse/translate_unittest.py
+++ b/third_party/mojo/src/mojo/public/tools/bindings/pylib/mojom_tests/parse/translate_unittest.py
@@ -59,6 +59,14 @@ class TranslateTest(unittest.TestCase):
actual = translate.Translate(tree, "mojom_tree")
self.assertEquals(actual["unions"], expected)
+ def testMapTreeForTypeRaisesWithDuplicate(self):
+ """Verifies _MapTreeForType() raises when passed two values with the same
+ name."""
+ methods = [ast.Method('dup', None, None, ast.ParameterList(), None),
+ ast.Method('dup', None, None, ast.ParameterList(), None)]
+ self.assertRaises(Exception, translate._MapTreeForType,
+ (lambda x: x, methods, '', 'scope'))
+
if __name__ == "__main__":
unittest.main()
« no previous file with comments | « third_party/mojo/src/mojo/public/tools/bindings/pylib/mojom/parse/translate.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698