tests/test-rust-ancestor.py
changeset 41705 0c7b353ce100
parent 41310 ab0d762d89ef
child 43076 2372284d9457
--- a/tests/test-rust-ancestor.py	Wed Jan 16 16:05:27 2019 +0100
+++ b/tests/test-rust-ancestor.py	Thu Jan 10 18:25:18 2019 +0100
@@ -19,6 +19,7 @@
         LazyAncestors,
         MissingAncestors,
     )
+    from mercurial.rustext import dagop
 
 try:
     from mercurial.cext import parsers as cparsers
@@ -165,6 +166,10 @@
         with self.assertRaises(error.WdirUnsupported):
             list(AncestorsIterator(idx, [node.wdirrev], -1, False))
 
+    def testheadrevs(self):
+        idx = self.parseindex()
+        self.assertEqual(dagop.headrevs(idx, [1, 2, 3]), {3})
+
 if __name__ == '__main__':
     import silenttestrunner
     silenttestrunner.main(__name__)