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
Package registry
Container Registry
Model registry
Operate
Terraform modules
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
Mark Evenson
ansi-test
Commits
37e08830
Commit
37e08830
authored
20 years ago
by
pfdietz
Browse files
Options
Downloads
Patches
Plain Diff
Made the random symbol printing tests faster.
parent
e055df04
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ansi-tests/print-symbols.lsp
+27
-36
27 additions, 36 deletions
ansi-tests/print-symbols.lsp
with
27 additions
and
36 deletions
ansi-tests/print-symbols.lsp
+
27
−
36
View file @
37e08830
...
...
@@ -304,45 +304,36 @@
nil)
(deftest print.symbol.random.3
(let ((result nil) (count 0) (tries 0))
(let ((pkg-name "PRINT-SYMBOL-TEST-PACKAGE"))
(when (find-package pkg-name)
(delete-package pkg-name)))
(block done
(do-all-symbols (s)
(when (symbol-package s)
(incf tries)
(let ((problem (randomly-check-readability s)))
(when problem
(setf result (nconc problem result))
(when (= (incf count) 10)
(push (format nil "... ~A out of ~A, stopping test ..."
count tries)
result)
(return-from done)))))))
(reverse result))
(let ((count 0)
(symbols (make-array '(1000) :fill-pointer 0 :adjustable t)))
;; Find all symbols that have a home package, put into array SYMBOLS
(do-all-symbols (s)
(when (symbol-package s)
(vector-push-extend s symbols (array-dimension symbols 0))))
(loop for i = (random (fill-pointer symbols))
for s = (aref symbols i)
for tries from 1 to 10000
for problem = (randomly-check-readability s)
nconc problem
when problem do (incf count)
while (< count 10)))
nil)
(deftest print.symbol.random.4
(let ((result nil) (count 0) (tries 0))
(let ((pkg-name "PRINT-SYMBOL-TEST-PACKAGE"))
(when (find-package pkg-name)
(delete-package pkg-name)))
(block done
(do-all-symbols (s)
(when (symbol-package s)
(incf tries)
(let ((problem
(let ((*package* (symbol-package s)))
(randomly-check-readability s))))
(when problem
(setf result (nconc problem result))
(when (= (incf count) 10)
(push (format nil "... ~A out of ~A, stopping test ..."
count tries)
result)
(return-from done)))))))
(reverse result))
(let ((count 0)
(symbols (make-array '(1000) :fill-pointer 0 :adjustable t)))
;; Find all symbols that have a home package, put into array SYMBOLS
(do-all-symbols (s)
(when (symbol-package s)
(vector-push-extend s symbols (array-dimension symbols 0))))
(loop for i = (random (fill-pointer symbols))
for s = (aref symbols i)
for tries from 1 to 10000
for problem = (let ((*package* (symbol-package s)))
(randomly-check-readability s))
nconc problem
when problem do (incf count)
while (< count 10)))
nil)
;;;; Tests of printing with escaping enabled
...
...
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