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

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

[nongnu] elpa/pacmacs 05c88e5eef 100/472: UTs for pacmacs--object-at-p (


From: ELPA Syncer
Subject: [nongnu] elpa/pacmacs 05c88e5eef 100/472: UTs for pacmacs--object-at-p (#75)
Date: Thu, 6 Jan 2022 21:59:16 -0500 (EST)

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

    UTs for pacmacs--object-at-p (#75)
---
 test/pacmacs-test.el | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/test/pacmacs-test.el b/test/pacmacs-test.el
index 1c18aa2316..a8a17974d0 100644
--- a/test/pacmacs-test.el
+++ b/test/pacmacs-test.el
@@ -18,3 +18,15 @@
                          [nil nil nil nil nil]]))
     (should (equal expected-board
                    (pacmacs--init-board width height)))))
+
+(ert-deftest pacmacs--object-at-p-test ()
+  (let ((pacmacs-board-width 5)
+        (pacmacs-board-height 4)
+        (objects (-map #'(lambda (x)
+                           (list :row x
+                                 :column x))
+                       (number-sequence 0 3))))
+    (should (pacmacs--object-at-p 0 0 objects))
+    (should (not (pacmacs--object-at-p 0 1 objects)))
+    (should (pacmacs--object-at-p 0 5 objects))
+    (should (not (pacmacs--object-at-p 1 5 objects)))))



reply via email to

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