[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs 4aa010be6e 051/472: Fix the Aseprite animation UTs
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs 4aa010be6e 051/472: Fix the Aseprite animation UTs. Close #31 |
Date: |
Thu, 6 Jan 2022 21:59:12 -0500 (EST) |
branch: elpa/pacmacs
commit 4aa010be6ee677e1697699ca6e60687b35df5482
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Fix the Aseprite animation UTs. Close #31
---
test/pacman-anim-test.el | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)
diff --git a/test/pacman-anim-test.el b/test/pacman-anim-test.el
index f5ed7a6d83..7db3407348 100644
--- a/test/pacman-anim-test.el
+++ b/test/pacman-anim-test.el
@@ -4,8 +4,9 @@
(ert-deftest pacman-make-anim-test ()
(should (equal (list :frames (list 1 2 3 4 5)
- :current-frame 0)
- (pacman-make-anim (number-sequence 1 5)))))
+ :current-frame 0
+ :sprite-sheet 42)
+ (pacman-make-anim (number-sequence 1 5) 42))))
(ert-deftest pacman-anim-get-frame-test ()
(let ((anim (list :frames (number-sequence 1 5)
@@ -70,16 +71,19 @@
(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)))))
+ (let* ((input-aseprite-format '((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))))))
+ (input-sprite-sheet 42)
+ (expected-output (pacman-make-anim
+ (mapcar #'(lambda (x)
+ (make-list 4 x))
+ (number-sequence 0 3))
+ input-sprite-sheet)))
(with-mock
- (mock (json-read-file *) => input)
+ (mock (json-read-file *) => input-aseprite-format)
+ (mock (pacman-load-resource *) => input-sprite-sheet)
(should (equal expected-output
- (pacman-load-anim "khooy"))))))
+ (pacman-load-anim "foo" "bar"))))))
- [nongnu] elpa/pacmacs 03bdb3388f 012/472: Add README. Close #18, (continued)
- [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, 2022/01/06
- [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 <=
- [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
- [nongnu] elpa/pacmacs ef0cd69d99 072/472: Add copyright header to pacman-utils module, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 66f585899a 080/472: Fix pacman image UTs, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs f7b17f7cde 079/472: Set same background as foreground for color block. Close #59, ELPA Syncer, 2022/01/06