branch: elpa/pacmacs
commit 05c88e5eef27a556a3f93630972563bc6685002e
Author: rexim <[email protected]>
Commit: rexim <[email protected]>
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)))))