;; Very basic storage model tests. (load "common.scm") (letrec ((a 0)) (letrec ((b (cons a 1))) (set-car! b 2) (assert-equal a 0))) (letrec ((a 0)) (define (b) a) (assert-equal (b) 0) (set! a 1) (assert-equal (b) 1)) (letrec ((a 0)) (define b ((lambda (a) (lambda () a)) 1)) (assert-equal (b) 1)) (assert-equal (let* ((a 1) (b a)) (set! a 2) b) 1) (let ((a 1)) ((lambda () (set! a 2))) (assert-equal a 2)) (let ((a (string #\a))) (let ((b a)) (assert (eq? a b)))) (let* ((a (list 1 2)) (b (apply list a))) (set-cdr! a '()) (assert-equal b '(1 2)))