Changeset 38282 in project


Ignore:
Timestamp:
03/16/20 18:54:23 (3 weeks ago)
Author:
Kon Lovett
Message:

optional test log

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/5/srfi-41/trunk/tests/run.scm

    r37256 r38282  
    3737    ": "
    3838    (make-error-type-message typnam argnam)) )
     39
     40(define *verbose* #f)
    3941
    4042(define-syntax tester
     
    5658              ;for
    5759              expr ) ) )
    58           (unless (equal? val result)
    59             (print "  --> Failed!")
    60             (write 'expr) (newline)
    61             (display "expected: ") (write result) (newline)
    62             (display "returned: ") (write expr) (newline) ) ) ) ) ) )
     60          (let (
     61            (ok? (equal? val result)) )
     62            (when (or *verbose* (not ok?))
     63              (newline)
     64              (write 'expr) (newline))
     65            (unless ok?
     66              (print "  --> Failed!"))
     67            (when (or *verbose* (not ok?))
     68              (display "expected: ") (write result) (newline)
     69              (display "returned: ") (write val) (newline) ) ) ) ) ) ) )
    6370
    6471(define strm123 (stream 1 2 3))
     
    384391)
    385392
    386 (print "Unit Test - Please wait. No output means \"passed\".")
     393(newline)
     394(display "Unit Test")
     395(if *verbose*
     396  (display ":")
     397  (display " - Please wait. No output means \"passed\"."))
     398(newline)
    387399(time (unit-test))
    388400
     
    400412      (stream-from 0))
    401413    3))
     414(newline)
    402415(print "Times3 Test - Please wait. No output means \"passed\".")
    403416(time (times3 SIZE))
     
    412425;;
    413426
     427(newline)
    414428(print "Traverse Test - Please wait. No output means \"passed\".")
    415429(time (stream-ref (traverse (stream-from 0)) SIZE))
     
    417431;;
    418432
     433(newline)
    419434(print "Traverse Test (with stream head held) - Please wait. No output means \"passed\".")
    420435(define strm (traverse (stream-from 0)))
Note: See TracChangeset for help on using the changeset viewer.