Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
ansi-test
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michał Herda
ansi-test
Commits
7c96dd9c
Commit
7c96dd9c
authored
19 years ago
by
pfdietz
Browse files
Options
Downloads
Patches
Plain Diff
Add base-string, simple-base-string, sequence types to make-random-type-containing
parent
57c0c407
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ansi-tests/random-type-prop.lsp
+17
-4
17 additions, 4 deletions
ansi-tests/random-type-prop.lsp
with
17 additions
and
4 deletions
ansi-tests/random-type-prop.lsp
+
17
−
4
View file @
7c96dd9c
...
@@ -366,14 +366,22 @@
...
@@ -366,14 +366,22 @@
(1 `(,root ,etype ,(loop for i below rank collect (make-random-array-dimension-spec val i))))
(1 `(,root ,etype ,(loop for i below rank collect (make-random-array-dimension-spec val i))))
(1 `(,root ,etype ,(loop for i below rank collect (array-dimension val i))))
(1 `(,root ,etype ,(loop for i below rank collect (array-dimension val i))))
#-ecl (1 `(,root ,etype ,rank))
#-ecl (1 `(,root ,etype ,rank))
(4 (call-next-method))
)))
)))
(defmethod make-random-type-containing ((val string))
(defmethod make-random-type-containing ((val string))
(rcase
(rcase
(1 (let ((root (if (and (coin)
(1 (let ((root (cond
(typep val 'simple-string))
((and (coin)
'simple-string
(typep val 'base-string))
'string)))
(cond
((and (coin) (typep val 'simple-base-string))
'simple-base-string)
(t 'base-string)))
((and (coin)
(typep val 'simple-string))
'simple-string)
(t 'string))))
(rcase (1 root)
(rcase (1 root)
(1 `(,root))
(1 `(,root))
(3 `(,root ,(make-random-array-dimension-spec val 0))))))
(3 `(,root ,(make-random-array-dimension-spec val 0))))))
...
@@ -426,6 +434,11 @@
...
@@ -426,6 +434,11 @@
'function))
'function))
(1 t)))
(1 t)))
(defmethod make-random-type-containing ((val sequence))
(rcase
(1 'sequence)
(2 (call-next-method))))
;;; Macro for defining random type prop tests
;;; Macro for defining random type prop tests
(defmacro def-type-prop-test (name &body args)
(defmacro def-type-prop-test (name &body args)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment