From 1c4668db62f662fc71f6a06dc375c3111b6a67b1 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sat, 22 Jan 2022 18:03:34 -0500 Subject: [PATCH] ADD test for edits which do nothing --- local/lib/dag/test/dag-test.el | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/local/lib/dag/test/dag-test.el b/local/lib/dag/test/dag-test.el index 33434b6..816e392 100644 --- a/local/lib/dag/test/dag-test.el +++ b/local/lib/dag/test/dag-test.el @@ -256,7 +256,7 @@ (e :children nil :parents (b c))) nil nil - (a c b e d))) + (a c b d e))) (ert-deftest dag-test-insert-overwrite () (dag-test-alist-insert-is-valid-p ((a) @@ -358,7 +358,7 @@ (e :children nil :parents (b c))) nil nil - (a c b e d))) + (a c b d e))) (ert-deftest dag-test-edit-null () (dag-test-alist-edit-is-valid-p ((a) @@ -377,6 +377,24 @@ nil (a c b e d))) +(ert-deftest dag-test-edit-cancel () + (dag-test-alist-edit-is-valid-p ((a) + (b a) + (c a) + (d b c) + (e b c)) + (b d) + ((b a) + (d b c)) + ((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 b c d e))) + ;; TODO add test for transitive reduction (provide 'dag-test)