emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master f80835a 038/135: Added tests for considerations


From: Ian Dunn
Subject: [elpa] master f80835a 038/135: Added tests for considerations
Date: Mon, 17 Feb 2020 10:52:49 -0500 (EST)

branch: master
commit f80835af84b1290fafb3fc27e68540692dc41917
Author: Ian D <address@hidden>
Commit: Ian D <address@hidden>

    Added tests for considerations
---
 org-edna-tests.el | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/org-edna-tests.el b/org-edna-tests.el
index d304c2a..3ffc5a8 100644
--- a/org-edna-tests.el
+++ b/org-edna-tests.el
@@ -150,6 +150,28 @@
 
 ;; Consideration
 
+(ert-deftest org-edna-consideration/all ()
+  (let ((blocks-blocking `("a" nil "b"))
+        (blocks-no-blocking `(nil nil nil)))
+    (should (string-equal (org-edna-handle-consideration 'all blocks-blocking) 
"a"))
+    (should (not (org-edna-handle-consideration 'all blocks-no-blocking)))))
+
+(ert-deftest org-edna-consideration/integer ()
+  (let ((blocks-blocking `("a" "c" "b"))
+        (blocks-no-blocking `("a" nil "b"))
+        (blocks-empty `(nil nil nil)))
+    (should (string-equal (org-edna-handle-consideration 1 blocks-blocking) 
"a"))
+    (should (not (org-edna-handle-consideration 1 blocks-no-blocking)))
+    (should (not (org-edna-handle-consideration 1 blocks-empty)))))
+
+(ert-deftest org-edna-consideration/float ()
+  (let ((blocks-blocking `("a" "c" "b"))
+        (blocks-no-blocking `("a" nil "b"))
+        (blocks-empty `(nil nil nil)))
+    (should (string-equal (org-edna-handle-consideration 0.25 blocks-blocking) 
"a"))
+    (should (not (org-edna-handle-consideration 0.25 blocks-no-blocking)))
+    (should (not (org-edna-handle-consideration 0.25 blocks-empty)))))
+
 (provide 'org-edna-tests)
 
 ;;; org-edna-tests.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]