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

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

[nongnu] elpa/pacmacs 17a82dffec 205/472: Add UT for object-type-at-p


From: ELPA Syncer
Subject: [nongnu] elpa/pacmacs 17a82dffec 205/472: Add UT for object-type-at-p
Date: Thu, 6 Jan 2022 21:59:25 -0500 (EST)

branch: elpa/pacmacs
commit 17a82dffec4f43c69333df178841111dcb057a1f
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>

    Add UT for object-type-at-p
---
 test/pacmacs-board-test.el | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/test/pacmacs-board-test.el b/test/pacmacs-board-test.el
index 9eabe6e059..0073949847 100644
--- a/test/pacmacs-board-test.el
+++ b/test/pacmacs-board-test.el
@@ -42,6 +42,20 @@
     (should (pacmacs--object-at-p board 0 5 objects))
     (should (not (pacmacs--object-at-p board 1 5 objects)))))
 
+(ert-deftest pacmacs--object-type-at-p-test ()
+  (let ((board (pacmacs--make-board 5 4)))
+    (dotimes (i 4)
+      (pacmacs--cell-wrapped-set
+       board i i
+       (list (list :row i
+                   :column i
+                   :type 'khooy))))
+
+    (should (pacmacs--object-type-at-p board 0 0 'khooy))
+    (should (not (pacmacs--object-type-at-p board 0 1 'khooy)))
+    (should (pacmacs--object-type-at-p board 0 5 'khooy))
+    (should (not (pacmacs--object-type-at-p board 1 5 'khooy)))))
+
 (ert-deftest pacmacs--step-point-test ()
   (let ((board (list :width 3
                      :height 2))



reply via email to

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