From 055adda28951159eef3d40f87ad2abf73663085e Mon Sep 17 00:00:00 2001 From: pfdietz <pfdietz@localhost> Date: Mon, 25 Oct 2004 14:52:00 +0000 Subject: [PATCH] Fixed up two tests that were iterating to char-code-limit. Added randomized tests for char-int.2, fixed failure reporting. --- ansi-tests/char-aux.lsp | 18 +++++++++++------- ansi-tests/character.lsp | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ansi-tests/char-aux.lsp b/ansi-tests/char-aux.lsp index df959731..af4fafbc 100644 --- a/ansi-tests/char-aux.lsp +++ b/ansi-tests/char-aux.lsp @@ -263,12 +263,16 @@ (setf (gethash c c->i) i) (setf (gethash i i->c) c) t)))))) - (and - (loop for i from 0 below char-code-limit - always (%insert (code-char i))) - (every #'%insert +standard-chars+) - (every #'%insert *universe*) - t)))) + (or + (loop for i from 0 below (min (ash 1 16) char-code-limit) + unless (%insert (code-char i)) + collect i) + (loop for i = (random char-code-limit) + repeat 1000 + unless (%insert (code-char i)) + collect i) + (find-if-not #'%insert +standard-chars+) + (find-if-not #'%insert *universe*))))) (defun char-name.1.fn () (declare (optimize (safety 3) (speed 1) (space 1))) @@ -280,7 +284,7 @@ (and (stringp name) (eqlt c (name-char name)))))))) (and - (loop for i from 0 below char-code-limit + (loop for i from 0 below (min (ash 1 16) char-code-limit) always (%check (code-char i))) (every #'%check +standard-chars+) (every #'%check *universe*) diff --git a/ansi-tests/character.lsp b/ansi-tests/character.lsp index 7d115d19..f8a35ea7 100644 --- a/ansi-tests/character.lsp +++ b/ansi-tests/character.lsp @@ -550,7 +550,7 @@ (deftest char-int.2 (char-int.2.fn) - t) + nil) (deftest char-int.order.1 (let ((i 0)) -- GitLab