ADD more tests for edits

This commit is contained in:
Nathan Dwarshuis 2022-01-15 20:18:23 -05:00
parent 2da4115c42
commit 6b8129883f
1 changed files with 49 additions and 0 deletions

View File

@ -328,6 +328,55 @@
nil
(c a e d)))
(ert-deftest dag-test-edit-remove ()
(dag-test-alist-edit-is-valid-p ((a)
(b a)
(c a)
(d b c)
(e b c))
(e)
nil
((a :children (b c) :parents nil)
(b :children (d) :parents (a))
(c :children (d) :parents (a))
(d :children nil :parents (b c)))
nil
nil
(a c b d)))
(ert-deftest dag-test-edit-insert ()
(dag-test-alist-edit-is-valid-p ((a)
(b a)
(c a))
nil
((d c b)
(e c b))
((a :children (b c) :parents nil)
(b :children (d e) :parents (a))
(c :children (d e) :parents (a))
(d :children nil :parents (b c))
(e :children nil :parents (b c)))
nil
nil
(a c b e d)))
(ert-deftest dag-test-edit-null ()
(dag-test-alist-edit-is-valid-p ((a)
(b a)
(c a)
(d b c)
(e b c))
nil
nil
((a :children (b c) :parents nil)
(b :children (e d) :parents (a))
(c :children (e d) :parents (a))
(d :children nil :parents (b c))
(e :children nil :parents (b c)))
nil
nil
(a c b e d)))
;; TODO add test for transitive reduction
(provide 'dag-test)