Changeset 39677 in project


Ignore:
Timestamp:
03/12/21 16:48:38 (6 weeks ago)
Author:
Kon Lovett
Message:

test runner w/ csc option remove, no test dep, add time to tests

Location:
release/5/srfi-45/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • release/5/srfi-45/trunk/srfi-45.egg

    r39675 r39677  
    22
    33((synopsis "SRFI-45: Primitives for Expressing Iterative Lazy Algorithms")
    4  (version "4.0.2")
     4 (version "4.0.3")
    55 (category lang-exts)
    66 (author "André van Tonder, for Chicken 4 by Kon Lovett, for Chicken 5 by [[Sergey Goldgaber]]")
    77 (maintainer "Kon Lovett")
    88 (dependencies check-errors)
    9  (test-dependencies test)
    109 (license "BSD")
    1110 (components
  • release/5/srfi-45/trunk/tests/run.scm

    r39670 r39677  
    66
    77(define EGG-NAME "srfi-45")
    8 
    9 ;! no -strict-types 4 srfi-45 !
    10 ;no -disable-interrupts or -no-lambda-info
    11 (define *csc-options* "-inline-global -local -inline \
    12   -specialize -optimize-leaf-routines -clustering -lfa2 \
    13   -no-trace -unsafe")
     8;rebinding by tests
     9(define *csc-remv-options* '(-strict-types))
    1410
    1511;chicken-install invokes as "<csi> -s run.scm <eggnam> <eggdir>"
     
    2319(import (only (chicken irregex) irregex irregex-match?))
    2420
     21(define (remq obj ls)
     22  (let loop ((curr ls) (prev '()))
     23    (cond
     24      ((null? curr)
     25        ls )
     26      ((eq? obj (car curr))
     27        (if (null? prev)
     28          (cdr ls)
     29          (begin
     30            (set-cdr! prev (cdr curr))
     31            ls ) ) )
     32      (else
     33        (loop (cdr curr) curr) ) ) ) )
     34
     35(define (remqs os ls)
     36  (let loop ((ls ls) (os os))
     37    (cond
     38      ((null? os)
     39        ls )
     40      (else
     41        (loop (remq (car os) ls) (cdr os)) ) ) ) )
     42
    2543(define *args* (argv))
    2644
     
    3250      (error 'run "cannot determine egg-name") ) ) )
    3351
     52(define (as-csc-options ls)
     53  (apply string-append (intersperse (map symbol->string ls) " ")) )
     54
    3455(define *current-directory* (cond-expand (unix "./") (else #f)))
    3556(define *egg* (egg-name *args*))
     57
     58;no -disable-interrupts or -no-lambda-info
     59(define *csc-init-options* '(-inline-global -local -inline
     60  -specialize -optimize-leaf-routines -clustering -lfa2
     61  -no-trace -unsafe -strict-types))
     62
     63(define *csc-options* (as-csc-options (remqs *csc-remv-options* *csc-init-options*)))
    3664
    3765(define *test-files-rx* (irregex '(: (+ graph) #\- "test" #\. "scm")))
  • release/5/srfi-45/trunk/tests/srfi-45-test.scm

    r39675 r39677  
    1717      (begin
    1818        (print "+++ Bounded Space Test: (force " '?expr ") +++")
    19         (force ?expr) ) ) ) )
     19        (time (force ?expr)) ) ) ) )
    2020
    2121(define-syntax -bounded-space
     
    3333(print "+++ Should print 'hi 1 +++")
    3434
     35(time
    3536(define r (r5rs:delay (begin (display 'hi) (display #\space) 1)))
    3637(define s (lazy r))
    3738(define t (lazy s))
    3839(print (force t))
     40)
    3941
    4042;=========================================================================
     
    4345(print "+++ Should print '(1 2 3) +++")
    4446
     47(time
    4548(define r (delay (values 1 2 3)))
    4649(define s (lazy r))
    4750(define t (lazy s))
    4851(print (receive (force t)))
     52)
    4953
    5054;=========================================================================
     
    5559(define s (delay (begin (print 'hello) 1)))
    5660
     61(time
    5762(force s)
    5863(force s)
     64)
    5965
    6066;=========================================================================
     
    6369(print "+++ Should print 'bonjour once +++")
    6470
     71(time
    6572(let ((s (delay (begin (print 'bonjour) 2))))
    6673  (+ (force s) (force s)))
     74)
    6775
    6876;=========================================================================
     
    7583(define t (lazy s))
    7684
     85(time
    7786(force t)
    7887(force r)
     88)
    7989
    8090;=========================================================================
     
    94104(define s (ones))
    95105
     106(time
    96107(car (force (stream-drop s 4)))
    97108(car (force (stream-drop s 4)))
     109)
    98110
    99111;=========================================================================
     
    109121               (force p)))))
    110122(define x 5)
     123
     124(time
    111125(print (force p))
    112126(set! x 10)
    113127(print (force p))
    114 
     128)
    115129
    116130;=========================================================================
     
    126140                 (force f))))))
    127141
     142(time
    128143(print (force f))
     144)
    129145
    130146;=========================================================================
     
    147163(define p (cadr q))
    148164
     165(time
    149166(print (get-count))
    150167(print (force p))
    151168(print (get-count))
     169)
    152170
    153171;=========================================================================
Note: See TracChangeset for help on using the changeset viewer.