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
db745584
Commit
db745584
authored
May 25, 2004
by
pfdietz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More cons printing tests (with circularity)
parent
d8b91d3c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
ansi-tests/print-cons.lsp
ansi-tests/print-cons.lsp
+19
-1
ansi-tests/printer-aux.lsp
ansi-tests/printer-aux.lsp
+2
-1
No files found.
ansi-tests/print-cons.lsp
View file @
db745584
...
...
@@ -59,6 +59,22 @@
10)
nil)
;; random circular cons graphs
(deftest print.cons.random.2
(loop repeat 50
nconc
(let* ((n 50)
(conses (apply #'vector
(loop repeat n collect (cons nil nil)))))
(loop for x across conses
for j = (random n)
for k = (random n)
do (setf (car x) (elt conses j)
(cdr x) (elt conses k)))
(randomly-check-readability (elt conses 0) :test #'is-similar
:circle t)))
nil)
;;; Printing with *print-length*
(deftest print.cons.length.1
...
...
@@ -136,4 +152,6 @@
(write-to-string '(#(a) #*1101 "abc")
:case :downcase :level 1
:readably nil :pretty nil))
"(# #*1101 \"abc\")")
\ No newline at end of file
"(# #*1101 \"abc\")")
ansi-tests/printer-aux.lsp
View file @
db745584
...
...
@@ -26,6 +26,7 @@
(can-fail nil)
(test #'equal)
(readable t)
(circle nil circle-p)
(escape nil escape-p)
(gensym nil gensym-p))
(declare (type function test))
...
...
@@ -35,7 +36,7 @@
(*print-base* (+ 2 (random 34)))
(*print-radix* (coin))
(*print-case* (random-from-seq #(:upcase :downcase :capitalize)))
(*print-circle* (
coin
))
(*print-circle* (
if circle-p circle (coin)
))
(*print-escape* (if escape-p escape (coin)))
(*print-gensym* (if gensym-p gensym (coin)))
(*print-level* (random 50))
...
...
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