Hello,

thanks for merging. :)

Olivier Dion <[email protected]> writes:

> Hi,
>
> I have merged these patches, but I do have a question.
>
> On Sun, 14 Jun 2026, Tomas Volf <[email protected]> wrote:
> [...]
>> -        (format #t "~a: ~a~%" prop val))))
>> +    (let* ((default (list))
>> +           (val (test-result-ref runner prop default)))
>> +      (unless (eq? val default)
>> +        (let ((val (string-trim-both
>> +                    (with-output-to-string
>> +                      (λ ()
>> +                        (if pretty?
>> +                            (pretty-print val #:per-line-prefix "           
>>   ")
>> +                            (display val)))))))
>> +          (format #t "~a: ~a~%" prop val)))))
>>  
>>    (let ((result-kind (test-result-kind runner)))
>>      ;; Skip tests not executed due to run list.
>
> It seems to me that here `default' is suppose to be unique for the
> purpose of checking if the property exist, by comparing the returned
> value against the default one.  However, this will not work if the value
> of the property is the empty list; (make-list 0) and (list) both return
> '().
>
> To fix this, I would recommend to define, possibly at top-level:
>
>   (define no-property (list 'no-property))
>
> and use that instead.

Ooooh you are right.  I have assumed that (list) always allocates a new
list.  But while (eq? (list 'x) (list 'x)) is #f, (eq? (list) (list)) is
#t.  Well, TIL.

Should I send a patch, or for change of this size it will be faster for
you to just fix it?

Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.



Reply via email to