Ignore:
Timestamp:
03/13/21 22:10:44 (8 weeks ago)
Author:
Kon Lovett
Message:

remove "primitives", use record-variants, add hof tests, new test runner

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/5/stack/trunk/tests/stack-test.scm

    r35980 r39694  
    1818
    1919(test-group "Push!/Pop!/Peek/Poke!"
    20   (let ([stk (make-stack)])
     20  (let ((stk (make-stack)))
    2121    (stack-push! stk 1)
    2222    (stack-push! stk 2 3)
     
    3636
    3737(test-group "Cut!"
    38   (let ([stk (make-stack)])
     38  (let ((stk (make-stack)))
    3939    ;3 2 1
    4040    (stack-push! stk 1 2 3)
     
    5555
    5656(test-group "Stack from List"
    57   (let ([stk (make-stack)]
    58         [stk1 (list->stack '(1 2 3))])
     57  (let ((stk (make-stack))
     58        (stk1 (list->stack '(1 2 3))))
    5959    ;
    6060    (stack-push! stk 1 2 3)
     
    6666)
    6767
     68(test-group "Stack HOF"
     69  (let ((stk (list->stack '(1 2 3))))
     70    (test 6 (stack-fold stk + 0))
     71    (test '(2 3 4) (stack-map stk add1)) )
     72)
     73
    6874;;;
    6975
Note: See TracChangeset for help on using the changeset viewer.