Skip to content

ASSERT-TRUE is broken. #41

@heegaiximephoomeeghahyaiseekh

Description

(define-test check-hex-string
   (let ((hex-string "ABC123"))
      (assert-true
         (loop for ch across hex-string
             always  (member ch (coerce "0123456789ABCDEF" 'list))))))

Results in a compile error on the undefined variables FOR, CH, ACROSS, and ALWAYS.

Replacing this with an assert-eq, where one of the two values is t, solves the problem. Perhaps
the definition of assert-true should simply be something like:

 (defmacro assert-true (expr)
     `(assert-eq (and ,expr t) t))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions