Index: mojo/python/tests/bindings_structs_unittest.py |
diff --git a/mojo/python/tests/bindings_structs_unittest.py b/mojo/python/tests/bindings_structs_unittest.py |
index 97c12450f7200c1bcea70e041d4b169a85d47bbd..f47cac56fcb8163edcf04c4964bc0312c0903032 100644 |
--- a/mojo/python/tests/bindings_structs_unittest.py |
+++ b/mojo/python/tests/bindings_structs_unittest.py |
@@ -10,6 +10,7 @@ import mojo.system |
# Generated files |
# pylint: disable=F0401 |
+import regression_tests_mojom |
import sample_import_mojom |
import sample_import2_mojom |
import sample_service_mojom |
@@ -206,3 +207,11 @@ class StructBindingsTest(unittest.TestCase): |
p = sample_import_mojom.Point(0, x=0) |
with self.assertRaises(TypeError): |
p = sample_import_mojom.Point(c=0) |
+ |
+ def testCyclicDefinition(self): |
+ a = regression_tests_mojom.A() |
+ b = regression_tests_mojom.B() |
+ self.assertIsNone(a.b) |
+ self.assertIsNone(b.a) |
+ a.b = b |
+ self.assertIs(a.b, b) |