Fix missing float handling into `comp-cstr-set-cmp-range'
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-set-cmp-range): Add float handling. * test/src/comp-tests.el (comp-tests-type-spec-tests): Update results.
This commit is contained in:
parent
fc02c8458d
commit
d893952053
2 changed files with 14 additions and 14 deletions
|
@ -366,7 +366,7 @@ Return them as multiple value."
|
|||
"Support range comparison functions."
|
||||
(with-comp-cstr-accessors
|
||||
(if ext-range
|
||||
(setf (typeset dst) ()
|
||||
(setf (typeset dst) (and (typeset old-dst) '(float))
|
||||
(valset dst) ()
|
||||
(range dst) (if (range old-dst)
|
||||
(comp-range-intersection (range old-dst)
|
||||
|
|
|
@ -953,84 +953,84 @@ Return a list of results."
|
|||
((defun comp-tests-ret-type-spec-f (x)
|
||||
(when (> x 3)
|
||||
x))
|
||||
(or null (integer 4 *)))
|
||||
(or null float (integer 4 *)))
|
||||
|
||||
;; 23
|
||||
((defun comp-tests-ret-type-spec-f (x)
|
||||
(when (>= x 3)
|
||||
x))
|
||||
(or null (integer 3 *)))
|
||||
(or null float (integer 3 *)))
|
||||
|
||||
;; 24
|
||||
((defun comp-tests-ret-type-spec-f (x)
|
||||
(when (< x 3)
|
||||
x))
|
||||
(or null (integer * 2)))
|
||||
(or null float (integer * 2)))
|
||||
|
||||
;; 25
|
||||
((defun comp-tests-ret-type-spec-f (x)
|
||||
(when (<= x 3)
|
||||
x))
|
||||
(or null (integer * 3)))
|
||||
(or null float (integer * 3)))
|
||||
|
||||
;; 26
|
||||
((defun comp-tests-ret-type-spec-f (x)
|
||||
(when (> 3 x)
|
||||
x))
|
||||
(or null (integer * 2)))
|
||||
(or null float (integer * 2)))
|
||||
|
||||
;; 27
|
||||
((defun comp-tests-ret-type-spec-f (x)
|
||||
(when (>= 3 x)
|
||||
x))
|
||||
(or null (integer * 3)))
|
||||
(or null float (integer * 3)))
|
||||
|
||||
;; 28
|
||||
((defun comp-tests-ret-type-spec-f (x)
|
||||
(when (< 3 x)
|
||||
x))
|
||||
(or null (integer 4 *)))
|
||||
(or null float (integer 4 *)))
|
||||
|
||||
;; 29
|
||||
((defun comp-tests-ret-type-spec-f (x)
|
||||
(when (<= 3 x)
|
||||
x))
|
||||
(or null (integer 3 *)))
|
||||
(or null float (integer 3 *)))
|
||||
|
||||
;; 30
|
||||
((defun comp-tests-ret-type-spec-f (x)
|
||||
(let ((y 3))
|
||||
(when (> x y)
|
||||
x)))
|
||||
(or null (integer 4 *)))
|
||||
(or null float (integer 4 *)))
|
||||
|
||||
;; 31
|
||||
((defun comp-tests-ret-type-spec-f (x)
|
||||
(let ((y 3))
|
||||
(when (> y x)
|
||||
x)))
|
||||
(or null (integer * 2)))
|
||||
(or null float (integer * 2)))
|
||||
|
||||
;; 32
|
||||
((defun comp-tests-ret-type-spec-f (x)
|
||||
(when (and (> x 3)
|
||||
(< x 10))
|
||||
x))
|
||||
(or null (integer 4 9)))
|
||||
(or null float (integer 4 9)))
|
||||
|
||||
;; 33
|
||||
((defun comp-tests-ret-type-spec-f (x)
|
||||
(when (or (> x 3)
|
||||
(< x 10))
|
||||
x))
|
||||
(or null integer))
|
||||
(or null float integer))
|
||||
|
||||
;; 34
|
||||
((defun comp-tests-ret-type-spec-f (x)
|
||||
(when (or (< x 3)
|
||||
(> x 10))
|
||||
x))
|
||||
(or null (integer * 2) (integer 11 *)))
|
||||
(or null float (integer * 2) (integer 11 *)))
|
||||
|
||||
;; 35 No float range support.
|
||||
((defun comp-tests-ret-type-spec-f (x)
|
||||
|
|
Loading…
Add table
Reference in a new issue