Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
ansi-test
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Karsten Poeck
ansi-test
Commits
7234c333
Commit
7234c333
authored
Feb 20, 2006
by
pfdietz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add random type prop tests for some sequence functions
parent
18bf9888
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
833 additions
and
0 deletions
+833
-0
ansi-tests/random-type-prop-tests-09.lsp
ansi-tests/random-type-prop-tests-09.lsp
+717
-0
ansi-tests/random-type-prop-tests-10.lsp
ansi-tests/random-type-prop-tests-10.lsp
+114
-0
ansi-tests/random-type-prop-tests.lsp
ansi-tests/random-type-prop-tests.lsp
+2
-0
No files found.
ansi-tests/random-type-prop-tests-09.lsp
0 → 100644
View file @
7234c333
This diff is collapsed.
Click to expand it.
ansi-tests/random-type-prop-tests-10.lsp
0 → 100644
View file @
7234c333
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Contains: Random type prop tests, part 10 (sequences, cont.)
(in-package :cl-test)
;;; SEARCH
(def-type-prop-test search.1 'search
(list 'sequence 'sequence)
2)
(def-type-prop-test search.2 'search
(list 'bit-vector 'bit-vector)
2)
(def-type-prop-test search.3 'search
(list '(vector * 1) 'sequence)
2)
(def-type-prop-test search.4 'search
(list '(vector * 2) 'sequence '(eql :from-end) '(or null t))
4)
(def-type-prop-test search.5 'search
(list 'sequence 'sequence '(eql :key)
(list 'member 'identity nil #'identity 'not #'not))
4)
(def-type-prop-test search.6 'search
(list #'(lambda () (make-sequence-type
(random 10)
(let ((i1 (make-random-integer))
(i2 (make-random-integer)))
`(integer ,(min i1 i2) ,(max i1 i2)))))
#'(lambda (s)
(declare (ignore s))
(make-sequence-type
(random 10)
(let ((i1 (make-random-integer))
(i2 (make-random-integer)))
`(integer ,(min i1 i2) ,(max i1 i2))))))
2)
(def-type-prop-test search.7 'search
(list #'(lambda () (make-sequence-type
(random 10)
(let ((i1 (make-random-integer))
(i2 (make-random-integer)))
`(integer ,(min i1 i2) ,(max i1 i2)))))
#'(lambda (s)
(declare (ignore s))
(make-sequence-type
(random 10)
(let ((i1 (make-random-integer))
(i2 (make-random-integer)))
`(integer ,(min i1 i2) ,(max i1 i2)))))
'(eql :test)
(list 'member 'eql #'eql 'equal #'equal '= #'=
'/= #'/= #'(lambda (x y) (= (logand x 1) (logand y 1)))))
4)
(def-type-prop-test search.8 'search
(labels ((%random-char-type () (random-from-seq #(base-char standard-char character)))
(%random-char-sequence-type (&rest ignored)
(declare (ignore ignored))
(make-sequence-type (random 10) (%random-char-type))))
(list #'%random-char-sequence-type
#'%random-char-sequence-type
'(member :test :test-not)
(let ((char-compare-funs
'(char= char/= char< char> char<= char>=
char-equal char-not-equal char-lessp char-greaterp
char-not-lessp char-not-greaterp)))
`(member ,@char-compare-funs
,@(mapcar #'symbol-function char-compare-funs)))))
4)
(def-type-prop-test search.9 'search
(list 'sequence 'sequence
'(eql :start1)
#'(lambda (s1 s2 k)
(declare (ignore s2 k))
(let ((len (length s1)))
`(integer 0 ,len))))
4)
(def-type-prop-test search.10 'search
(list 'sequence 'sequence
'(eql :end1)
#'(lambda (s1 s2 k)
(declare (ignore s2 k))
(let ((len (length s1)))
`(integer 0 ,len))))
4)
(def-type-prop-test search.11 'search
(list 'sequence 'sequence
'(eql :start2)
#'(lambda (s1 s2 k)
(declare (ignore s1 k))
(let ((len (length s2)))
`(integer 0 ,len))))
4)
(def-type-prop-test search.12 'search
(list 'sequence 'sequence
'(eql :end2)
#'(lambda (s1 s2 k)
(declare (ignore s1 k))
(let ((len (length s2)))
`(integer 0 ,len))))
4)
ansi-tests/random-type-prop-tests.lsp
View file @
7234c333
...
...
@@ -15,4 +15,6 @@
(load "random-type-prop-tests-06.lsp")
(load "random-type-prop-tests-07.lsp")
(load "random-type-prop-tests-08.lsp")
(load "random-type-prop-tests-09.lsp")
(load "random-type-prop-tests-10.lsp")
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment