fix part of #53, assertion failure in print_traverse
This commit is contained in:
parent
0b6dd2ca11
commit
150a160960
3
print.c
3
print.c
|
@ -89,6 +89,9 @@ void print_traverse(value_t v)
|
|||
for(i=0; i < vector_size(v); i++)
|
||||
print_traverse(vector_elt(v,i));
|
||||
}
|
||||
else if (iscprim(v)) {
|
||||
// don't consider shared references to e.g. chars
|
||||
}
|
||||
else if (isclosure(v)) {
|
||||
mark_cons(v);
|
||||
function_t *f = (function_t*)ptr(v);
|
||||
|
|
|
@ -292,5 +292,14 @@
|
|||
|
||||
(assert (equal? 1.0 (* 1.0 1))) ; tests that * no longer does inexact->exact
|
||||
|
||||
(define (with-output-to-string nada thunk)
|
||||
(let ((b (buffer)))
|
||||
(with-output-to b (thunk))
|
||||
(io.tostring! b)))
|
||||
|
||||
(let ((c #\a))
|
||||
(assert (equal? (with-output-to-string #f (lambda () (print (list c c))))
|
||||
"(#\\a #\\a)")))
|
||||
|
||||
(princ "all tests pass\n")
|
||||
#t
|
||||
|
|
Loading…
Reference in New Issue