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

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

[nongnu] elpa/buttercup 427a798cea 3/4: docs: Add more examples of :to-t


From: ELPA Syncer
Subject: [nongnu] elpa/buttercup 427a798cea 3/4: docs: Add more examples of :to-throw to writing-tests.md
Date: Mon, 26 Dec 2022 19:58:27 -0500 (EST)

branch: elpa/buttercup
commit 427a798ceab7e5251350b66ab5b9958a4d40021f
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Ola Nilsson <ola.nilsson@gmail.com>

    docs: Add more examples of :to-throw to writing-tests.md
---
 docs/writing-tests.md | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/docs/writing-tests.md b/docs/writing-tests.md
index 758d1568c0..083f5fb33b 100644
--- a/docs/writing-tests.md
+++ b/docs/writing-tests.md
@@ -159,7 +159,14 @@ that are not included below.
       (expect (+ a 1) :to-throw 'void-variable))
     (it "optionally matches arguments to signals"
         (expect (+ a 1) :not :to-throw 'void-variable '(b))
-        (expect (+ a 1) :to-throw 'void-variable '(a)))))
+        (expect (+ a 1) :to-throw 'void-variable '(a)))
+       (it "matches inherited signals"
+         (expect (signal 'overflow-error nil) :to-throw 'overflow-error)
+         (expect (signal 'overflow-error nil) :to-throw 'arith-error)
+         (expect (signal 'overflow-error nil) :to-throw 'error)
+         (expect (signal 'arith-error nil) :not :to-throw 'overflow-error)
+         (expect (signal 'arith-error nil) :to-throw 'arith-error)
+         (expect (signal 'arith-error nil) :to-throw 'error))))
 ```
 
 If you are migrating from ERT, you can also use `should` and similar



reply via email to

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