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() |