Raymond Toy pushed to branch issue-318-add-concrete-standard-char-type at cmucl / cmucl Commits: 4173744f by Raymond Toy at 2026-05-04T08:37:08-07:00 Just test the ASCII characters That covers standard-char and others. - - - - - 1 changed file: - tests/standard-char.lisp Changes: ===================================== tests/standard-char.lisp ===================================== @@ -232,21 +232,19 @@ (define-test standard-char.etypecase (:tag :issues) - (let ((*random-state* (make-random-state))) - ;; Test etypecase with standard-char works correctly using random - ;; characters. To make this repeatable, use a fixed random-state, - ;; otherwise, it becomes hard to debug - (dotimes (k 200) - (let* ((ch (code-char (random 128))) - (expected (if (standard-char-p ch) - :is-standard :is-other)) - (actual (handler-case - (etypecase ch - (standard-char :is-standard) - (character :is-other)) - (error () - :error)))) - (assert-eql expected actual ch))))) + ;; Test that etypecase works using ASCII characters which will cover + ;; standard-char values and other characters. + (dotimes (k 128) + (let* ((ch (code-char k)) + (expected (if (standard-char-p ch) + :is-standard :is-other)) + (actual (handler-case + (etypecase ch + (standard-char :is-standard) + (character :is-other)) + (error () + :error)))) + (assert-eql expected actual ch)))) (define-test standard-char.caching (:tag :issues) View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/4173744fb861c0ccc275742b... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/4173744fb861c0ccc275742b... You're receiving this email because of your account on gitlab.common-lisp.net. Manage all notifications: https://gitlab.common-lisp.net/-/profile/notifications | Help: https://gitlab.common-lisp.net/help
participants (1)
-
Raymond Toy (@rtoy)