Test output for yasos [ok]

Testing time: 0s

'/usr/home/chicken/salmonella/build/salmonella-run-publish/chicken/bin/csi' -script run.scm < /dev/null 2>&1

Testing YASOS ...
----------------------------
(define fred (make-person "Fred" 19 "573-19-4279" 'FadeCafe))
... passed in (accounts?)
(define sally
  (make-account "Sally" 26 "629-26-9742" 'FeedBabe 263 'bank-password))
... passed in (accounts?)
(person? fred)
... passed in (accounts?)
(person? sally)
... passed in (accounts?)
(bank-account? sally)
... passed in (accounts?)
(not (bank-account? fred))
... passed in (accounts?)
(string=?
  (with-output-to-string (lambda () (show fred)))
  "#<Person: Fred age: 19>\n")
... passed in (accounts?)
(string=? (ssn fred 'FadeCafe) "573-19-4279")
... passed in (accounts?)
(string=?
  (with-output-to-string (lambda () (show sally)))
  "#<Bank-Customer Sally>\n")
... passed in (accounts?)
(string=?
  (with-output-to-string (lambda () (ssn sally 'bogus)))
  "\nCALL THE POLICE!!\n")
... passed in (accounts?)
(string=? (ssn sally 'FeedBabe) "629-26-9742")
... passed in (accounts?)
(string=?
  (with-output-to-string (lambda () (current-balance sally 'FeedBabe)))
  "Your Balance is $263\n")
... passed in (accounts?)
New balance: $463
New balance: $763
New balance: $363
(string=?
  (begin
    (add sally 200)
    (add sally 300)
    (withdraw sally 400 'FeedBabe)
    (with-output-to-string (lambda () (current-balance sally 'FeedBabe))))
  "Your Balance is $363\n")
... passed in (accounts?)
(equal? (get-account-history sally 'bank-password) '(363 763 463 263))
... passed in (accounts?)
(string=?
  (with-output-to-string
    (lambda () (withdraw sally 150 (get-pin sally 'bank-password))))
  "New balance: $213\n")
... passed in (accounts?)
(equal? (get-account-history sally 'bank-password) '(213 363 763 463 263))
... passed in (accounts?)
(string=?
  (with-output-to-string (lambda () (ssn fred 'bogus)))
  "Bad password: bogus\n")
... passed in (accounts?)
(equal?
  (protocol sally)
  '(bank-account?
     show
     get-pin
     get-account-history
     bad-password
     ssn
     (person? show name age ssn new-password bad-password set-age!)
     (account-history? add withdraw current-balance get-account-history)))
... passed in (accounts?)
(equal? (protocol sally 'ssn) '(ssn self password))
... passed in (accounts?)
(import points)
... passed in (points?)
(define eps 0.0001)
... passed in (points?)
(define cart (make-point-cartesian -1 0))
... passed in (points?)
(define pol (make-point-polar 1 (acos -1)))
... passed in (points?)
(< (distance cart pol) eps)
... passed in (points?)
(= (rho cart) 1)
... passed in (points?)
(scale! pol 5)
... passed in (points?)
(< (abs (- (x pol) -5)) eps)
... passed in (points?)
(translate! cart 1 1)
... passed in (points?)
(= (x cart) 0)
... passed in (points?)
(= (y cart) 1)
... passed in (points?)
(rotate! pol 3.14159)
... passed in (points?)
(< (distance pol (make-point-cartesian 5 0)) eps)
... passed in (points?)
(= (size pol) 2)
... passed in (points?)
(define st (make-stack))
... passed in (stacks?)
(stack? st)
... passed in (stacks?)
(not (ra-stack? st))
... passed in (stacks?)
(empty? st)
... passed in (stacks?)
(push! st 0)
... passed in (stacks?)
(push! st 1)
... passed in (stacks?)
(push! st 2)
... passed in (stacks?)
(= (size st) 3)
... passed in (stacks?)
(not (empty? st))
... passed in (stacks?)
(= (top st) 2)
... passed in (stacks?)
(pop! st)
... passed in (stacks?)
(= (top st) 1)
... passed in (stacks?)
(pop! st)
... passed in (stacks?)
(= (size st) 1)
... passed in (stacks?)
(clear! st)
... passed in (stacks?)
(empty? st)
... passed in (stacks?)
(define rst (make-ra-stack))
... passed in (stacks?)
(ra-stack? rst)
... passed in (stacks?)
(stack? rst)
... passed in (stacks?)
(push! rst 0)
... passed in (stacks?)
(push! rst 1)
... passed in (stacks?)
(push! rst 2)
... passed in (stacks?)
(= (down rst 1) 1)
... passed in (stacks?)
(= (top rst) 2)
... passed in (stacks?)
(pop! rst)
... passed in (stacks?)
(= (top rst) 1)
... passed in (stacks?)
(= (down rst 1) 0)
... passed in (stacks?)
(equal?
  (protocol rst)
  '(ra-stack? show down (stack? empty? size show state top push! pop! clear!)))
... passed in (stacks?)
(equal? (protocol rst 'down) '(down self k))
... passed in (stacks?)
(define qu (make-queue))
... passed in (queues?)
(queue? qu)
... passed in (queues?)
(not (queue? #f))
... passed in (queues?)
(empty? qu)
... passed in (queues?)
(enq! qu 0)
... passed in (queues?)
(enq! qu 1)
... passed in (queues?)
(enq! qu 2)
... passed in (queues?)
(= (size qu) 3)
... passed in (queues?)
(not (empty? qu))
... passed in (queues?)
(= (front qu) 0)
... passed in (queues?)
(deq! qu)
... passed in (queues?)
(= (front qu) 1)
... passed in (queues?)
(deq! qu)
... passed in (queues?)
(= (size qu) 1)
... passed in (queues?)
(clear! qu)
... passed in (queues?)
(empty? qu)
... passed in (queues?)
(equal? (protocol qu) '(queue? empty? size show state front enq! deq! clear!))
... passed in (queues?)

Results of YASOS
----------------------------
All tests passed