From 3f51e7ef8dea66e893b022bb7c149b632eccfcc0 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Wed, 7 Sep 2022 10:20:02 -0500 Subject: Change: with-bindings to let --- examples.lisp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/examples.lisp b/examples.lisp index 831cb09..b515b98 100644 --- a/examples.lisp +++ b/examples.lisp @@ -13,20 +13,15 @@ "Hey, a docstring." :tests (:program test-fibble) - (= (1 2) 13) - (>= (1 2 :z 1) -5) - (:outputp (0 10 :z 0) (lambda (result) (equalp result 10))) - (:fails ("strings" "ain't" :z "numbers")) :end (+ x y z)) - (defvar *count*) (defun/t increment-count () "Increments the *count* variable." :tests - (:with-bindings ((*count* 4)) + (:let ((*count* 4)) (:afterp () (lambda () (= *count* 5))) (= () 6) (:outputp () (lambda (x) (= x 7)))) @@ -36,9 +31,9 @@ (defun/t other-increment-count (&optional (amount 1)) "Also increments the *count* variable by an optional amount." :tests - (:with-bindings ((*count* 10)) + (:let ((*count* 10)) (= () 11)) - (:with-bindings ((*count* 0)) + (:let ((*count* 0)) (= (10) 10) (:afterp (2) (lambda () (= *count* 12)))) :end -- cgit v1.2.3