[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup 435fc0d378 4/9: tests: Fix some buttercup-expect
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup 435fc0d378 4/9: tests: Fix some buttercup-expect tests |
Date: |
Wed, 10 Aug 2022 18:58:14 -0400 (EDT) |
branch: elpa/buttercup
commit 435fc0d378bd2855e02418e5398f61cd94364f6d
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Ola Nilsson <ola.nilsson@gmail.com>
tests: Fix some buttercup-expect tests
* Use buttercup--wrap-expr
* Use functions instead of local matchers (as they are not local but
global)
* Use expressions that return the opposite of the matchers.
for these tests
The `buttercup-expect' function
with a matcher argument
should not raise an error if the matcher returns true
should raise an error if the matcher returns false
---
tests/test-buttercup.el | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/tests/test-buttercup.el b/tests/test-buttercup.el
index 17a49e036b..c46d0785ed 100644
--- a/tests/test-buttercup.el
+++ b/tests/test-buttercup.el
@@ -197,16 +197,13 @@ text properties using `ansi-color-apply'."
'buttercup-failed)))
(describe "with a matcher argument"
- (buttercup-define-matcher :always-true (_a) t)
- (buttercup-define-matcher :always-false (_a) nil)
-
(it "should not raise an error if the matcher returns true"
- (expect (buttercup-expect (lambda () 1) :always-true)
+ (expect (buttercup-expect (buttercup--wrap-expr (ignore)) #'always)
:not :to-throw
'buttercup-failed))
(it "should raise an error if the matcher returns false"
- (expect (buttercup-expect (buttercup--wrap-expr 1) :always-false)
+ (expect (buttercup-expect (buttercup--wrap-expr t) #'ignore)
:to-throw
'buttercup-failed))))
- [nongnu] elpa/buttercup updated (62176a39ee -> 497f6c2795), ELPA Syncer, 2022/08/10
- [nongnu] elpa/buttercup ec4d94f7d5 3/9: tests: Create enclosed expressions with buttercup--wrap-expr, ELPA Syncer, 2022/08/10
- [nongnu] elpa/buttercup ef293a62df 1/9: Fix: (buttercup--enclosed-expr) byte-code functions, ELPA Syncer, 2022/08/10
- [nongnu] elpa/buttercup 8dda6ef8c9 2/9: Refactor the expect macro, ELPA Syncer, 2022/08/10
- [nongnu] elpa/buttercup 1bb0ba9439 8/9: Merge PR 219 into byte-compiled, ELPA Syncer, 2022/08/10
- [nongnu] elpa/buttercup 497f6c2795 9/9: Merge branch 'byte-compiled', ELPA Syncer, 2022/08/10
- [nongnu] elpa/buttercup 4cbd106609 5/9: tests: Use buttercup--wrap-expr instead of make-list-of-closures, ELPA Syncer, 2022/08/10
- [nongnu] elpa/buttercup 435fc0d378 4/9: tests: Fix some buttercup-expect tests,
ELPA Syncer <=
- [nongnu] elpa/buttercup 0e26b1bbed 6/9: Clean up buttercup--enclosed-expr, ELPA Syncer, 2022/08/10
- [nongnu] elpa/buttercup cdbb8b061d 7/9: tests: Add tests for buttercup--enclosed-expr, ELPA Syncer, 2022/08/10