Raymond Toy pushed to branch issue-318-add-concrete-standard-char-type at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • tests/standard-char.lisp
    ... ... @@ -232,21 +232,19 @@
    232 232
     
    
    233 233
     (define-test standard-char.etypecase
    
    234 234
         (:tag :issues)
    
    235
    -  (let ((*random-state* (make-random-state)))
    
    236
    -    ;; Test etypecase with standard-char works correctly using random
    
    237
    -    ;; characters.  To make this repeatable, use a fixed random-state,
    
    238
    -    ;; otherwise, it becomes hard to debug
    
    239
    -    (dotimes (k 200)
    
    240
    -      (let* ((ch (code-char (random 128)))
    
    241
    -	     (expected (if (standard-char-p ch)
    
    242
    -			   :is-standard :is-other))
    
    243
    -	     (actual (handler-case
    
    244
    -			 (etypecase ch
    
    245
    -			   (standard-char :is-standard)
    
    246
    -			   (character :is-other))
    
    247
    -		       (error ()
    
    248
    -			 :error))))
    
    249
    -	(assert-eql expected actual ch)))))
    
    235
    +  ;; Test that etypecase works using ASCII characters which will cover
    
    236
    +  ;; standard-char values and other characters.
    
    237
    +  (dotimes (k 128)
    
    238
    +    (let* ((ch (code-char k))
    
    239
    +	   (expected (if (standard-char-p ch)
    
    240
    +			 :is-standard :is-other))
    
    241
    +	   (actual (handler-case
    
    242
    +		       (etypecase ch
    
    243
    +			 (standard-char :is-standard)
    
    244
    +			 (character :is-other))
    
    245
    +		     (error ()
    
    246
    +		       :error))))
    
    247
    +      (assert-eql expected actual ch))))
    
    250 248
     
    
    251 249
     (define-test standard-char.caching
    
    252 250
         (:tag :issues)