xtmtest-update-test-result   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/scheme.xtm

Implementation

(define xtmtest-update-test-result
  (lambda (func-sym label call expected got)
    (let ((tail (assoc label *xtmtest-results*))
          (reslist (list func-sym call expected got)))
      (set-cdr! tail
                (cons reslist
                      (cl:remove-if (lambda (res) (equal? res reslist))
                                    (cdr tail)))))
    (print "result: ")
    (print-with-colors (case label
                         ('correct 'green)
                         ('incorrect 'magenta)
                         ('compile 'yellow)
                         ('no-compile ' red))
                       'default #t (print label "\n"))))


Back to Index

Similar Entries