summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-12-02 21:44:00 +0100
committerAndrea Corallo <akrl@sdf.org>2020-12-05 19:01:03 +0100
commit9b85ae6aa5d73649c0a48d5168d4de52ee83ac28 (patch)
treed2a30c36031bcd90d01436f23858ca3a1f6bd192 /test/lisp/emacs-lisp
parenteb8d15547bfc0821232af12c1ce193e40cdf16c0 (diff)
downloademacs-9b85ae6aa5d73649c0a48d5168d4de52ee83ac28.tar.gz
emacs-9b85ae6aa5d73649c0a48d5168d4de52ee83ac28.tar.bz2
emacs-9b85ae6aa5d73649c0a48d5168d4de52ee83ac28.zip
Initial constraint negation support
* lisp/emacs-lisp/comp-cstr.el (comp-cstr): Add `neg' slot. (comp-range-negation, comp-cstr-negation) (comp-cstr-negation-make): New functions. (comp-type-spec-to-cstr): Enable `not` in type specifiers. (comp-cstr-to-type-spec): Update logic to handle negation. * test/lisp/emacs-lisp/comp-cstr-tests.el (comp-cstr-typespec-tests-alist): Add a test.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r--test/lisp/emacs-lisp/comp-cstr-tests.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/lisp/emacs-lisp/comp-cstr-tests.el b/test/lisp/emacs-lisp/comp-cstr-tests.el
index c98ff80cd72..541533601b1 100644
--- a/test/lisp/emacs-lisp/comp-cstr-tests.el
+++ b/test/lisp/emacs-lisp/comp-cstr-tests.el
@@ -77,7 +77,8 @@
((and (integer -1 2) (integer 3 5)) . nil)
((and (integer -1 3) (integer 3 5)) . (integer 3 3))
((and (integer -1 4) (integer 3 5)) . (integer 3 4))
- ((and (integer -1 5) nil) . nil))
+ ((and (integer -1 5) nil) . nil)
+ ((not symbol) . (not symbol)))
"Alist type specifier -> expected type specifier.")
(defmacro comp-cstr-synthesize-tests ()