xtmtest-print-results   scheme


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

Implementation

(define xtmtest-print-results
  (lambda ()
    (println)
    (print-with-colors 'black 'blue #t (print " Test results "))
    (print "\n\n")
    (for-each (lambda (label-list)
                (if (> (length label-list) 1)
                    (begin
                      (print-with-colors 'blue 'default #t (print (car label-list) "\n\n"))
                      (for-each (lambda (reslist)
                                  (print "  name: ")
                                  (print-with-colors (case (car label-list)
                                                       ('correct 'green)
                                                       ('incorrect 'magenta)
                                                       ('compile 'yellow)
                                                       ('no-compile ' red))
                                                     'default #f (print (car reslist)))
                                  (print " call: ")
                                  (print-with-colors 'blue 'default #f (print (cadr reslist)))
                                  (if (caddr reslist)
                                      (begin (print " result:" (caddr reslist))
                                             (if (not (equal? (car label-list) 'correct))
                                                 (print " expecting:" (cadddr reslist)))))
                                  (println))
                                (cdr label-list))))
                (println))
              *xtmtest-results*)))


Back to Index

Similar Entries

  • xtmtest-print-results    scheme