From: Christophe Rhodes Date: Thu, 12 Dec 2013 14:54:28 +0000 (+0000) Subject: test case! X-Git-Tag: els2014-submission~28 X-Git-Url: http://christophe.rhodes.io/gitweb/?a=commitdiff_plain;h=f06d688ce6a5d48a10990838efe63e69ae6a7db6;p=specializable.git test case! Include some assertions on the behaviour of WALK --- diff --git a/cons-specializer.lisp b/cons-specializer.lisp index 0c834f2..c0ec716 100644 --- a/cons-specializer.lisp +++ b/cons-specializer.lisp @@ -67,4 +67,10 @@ (cadr form)) (defmethod walk ((form (cons let))) (let ((bindings (cadr form))) - `(with-bindings ,bindings ,@(cddr form)))))) + `(with-bindings ,bindings ,@(mapcar #'walk (cddr form))))) + + (assert (equal (walk t) '(lookup t))) + (assert (equal (walk nil) '(lookup nil))) + (assert (equal (walk '(foo bar)) '(call (flookup foo) (list (lookup bar))))) + (assert (equal (walk '(quote bar)) 'bar)) + (assert (equal (walk '(let foo bar)) '(with-bindings foo (lookup bar))))))