Skip to content
Snippets Groups Projects
Commit 23cea748 authored by pfdietz's avatar pfdietz
Browse files

Add rule for NOT types to make-random-element-of-type

parent 50dbcc4b
No related branches found
No related tags found
No related merge requests found
...@@ -1134,6 +1134,10 @@ ...@@ -1134,6 +1134,10 @@
when (typep x (cons 'and (cddr type))) when (typep x (cons 'and (cddr type)))
return x return x
finally (error "Cannot generate random element of ~A" type))) finally (error "Cannot generate random element of ~A" type)))
(not
(assert (cdr type))
(assert (not (cddr type)))
(make-random-element-of-type `(and t ,type)))
(integer (integer
(let ((lo (let ((lo (cadr type))) (let ((lo (let ((lo (cadr type)))
(cond (cond
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment