learning-sicp

My embarrassing half assed SICP run.
git clone https://kaka.farm/~git/learning-sicp
Log | Files | Refs

commit bab5b89784fa0b2d7c5f3f9cc53b9aa6d7a7ba35
parent fdac643b6e930fd1c6cb89dd9c20fa8957529e5c
Author: Yuval Langer <yuval.langer@gmail.com>
Date:   Mon, 22 Jul 2024 14:47:33 +0300

Add tests for exercise 4.1. .

Diffstat:
Asicp/tests/chapter-4/exercise-1.scm | 21+++++++++++++++++++++
1 file changed, 21 insertions(+), 0 deletions(-)

diff --git a/sicp/tests/chapter-4/exercise-1.scm b/sicp/tests/chapter-4/exercise-1.scm @@ -0,0 +1,21 @@ +(define-library (sicp tests chapter-4 exercise-1) + (import (scheme base) + + (srfi :64) + + (sicp solutions chapter-4 exercise-1)) + + (begin + (test-begin "chapter-4-exercise-1") + + (test-equal -1 + (left-to-right:eval '(+ -2 1) + (left-to-right:make-environment '(+) + `((primitive ,+))))) + + (test-equal -1 + (right-to-left:eval '(+ -2 1) + (right-to-left:make-environment '(+) + `((primitive ,+))))) + + (test-end "chapter-4-exercise-1")))