This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

broken (field x 'length) testcase


> (cmp-bytes (Base64:decode "ABCD") (Base64:decode "ABCD") "CRI")

What's Base64 ?

> (define (cmp-bytes b1      ;expected value
>                    b2	;value from DB
>                    field
> 		   )
>   (write (list b1 b2))(newline)
>   (let ((l1 (field b1 'length)))
>     ;;(write l1)
>     (values)))

There is a bug, but I believe it's in the code quoted above.

Try either

    (define (cmp-bytes b1      ;expected value
                       b2	;value from DB
                       field-value
                       )
      (write (list b1 b2))(newline)
      (let ((l1 (field b1 'length)))
        ;;(write l1)
        (values)))

or

  (cmp-bytes (Base64:decode "ABCD") 
             (Base64:decode "ABCD") 
             (lambda (x y) "CRI"))

Regards,
Chris Dean


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]