[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs cb29133875 045/472: Add UT for pacman-load-anim fu
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs cb29133875 045/472: Add UT for pacman-load-anim function |
Date: |
Thu, 6 Jan 2022 21:59:11 -0500 (EST) |
branch: elpa/pacmacs
commit cb291338759e0d2fe580d312f1bd54052d502590
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Add UT for pacman-load-anim function
---
test/pacman-anim-test.el | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/test/pacman-anim-test.el b/test/pacman-anim-test.el
index 2f594bdb04..f5ed7a6d83 100644
--- a/test/pacman-anim-test.el
+++ b/test/pacman-anim-test.el
@@ -1,5 +1,6 @@
(require 'cl) ;el-mock doesn't work without
;this
+(require 'json)
(ert-deftest pacman-make-anim-test ()
(should (equal (list :frames (list 1 2 3 4 5)
@@ -67,3 +68,18 @@
(w . 4)))))
(should (pacman-compare-aseprite-frames aseprite-frame1 aseprite-frame2))
(should (not (pacman-compare-aseprite-frames aseprite-frame2
aseprite-frame1)))))
+
+(ert-deftest pacman-load-anim-test ()
+ (let ((input '((frames
+ (frame-3\.ase (frame (h . 3) (w . 3) (y . 3) (x . 3)))
+ (frame-2\.ase (frame (h . 2) (w . 2) (y . 2) (x . 2)))
+ (frame-1\.ase (frame (h . 1) (w . 1) (y . 1) (x . 1)))
+ (frame-0\.ase (frame (h . 0) (w . 0) (y . 0) (x . 0))))))
+ (expected-output (pacman-make-anim
+ (mapcar #'(lambda (x)
+ (make-list 4 x))
+ (number-sequence 0 3)))))
+ (with-mock
+ (mock (json-read-file *) => input)
+ (should (equal expected-output
+ (pacman-load-anim "khooy"))))))
- [nongnu] elpa/pacmacs 7a713ac0b7 010/472: Add UTs again, (continued)
- [nongnu] elpa/pacmacs 7a713ac0b7 010/472: Add UTs again, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs da5576a321 008/472: Add UTs. Close #6, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 515b977a4c 026/472: Add UT for pacman-anim-next-frame function (#22), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 03bdb3388f 012/472: Add README. Close #18, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 8283a893c2 018/472: Update README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 0828edabf2 019/472: Don't remove elc files during Travis build (#20), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 63bfb71c85 029/472: Add UT for pacman-aseprite-frame-get-order (#22), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 3554251103 033/472: Add coveralls badge (#27), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 56968d5966 034/472: Require undercover in test-helpers (#27), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 833e2d8de2 041/472: Add a note about the licensing to README (#28), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs cb29133875 045/472: Add UT for pacman-load-anim function,
ELPA Syncer <=
- [nongnu] elpa/pacmacs 14e4a5a771 046/472: Mystical cookies appear! Close #15, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 39f6dbc6a3 049/472: Merge branch 'pacman-mechanics-5'. Close #5, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 4aa010be6e 051/472: Fix the Aseprite animation UTs. Close #31, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 4e935a6d89 050/472: The 4th mystical cookie appears! Close #30, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs fbde339ff0 052/472: All the mystical cookies are merged into one! Close #15, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 1efc678194 053/472: Implement сonveyor rendering. Close #35, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 1414723d42 059/472: Implement wall mechanics. Close #36, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 420c485197 054/472: Implement pacman mechanics. Close #32, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs c20aa8089c 058/472: Implement plist-bind macro. Close #47, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 07e18ca1e6 067/472: Implement pills. Close #34, ELPA Syncer, 2022/01/06