# gambit/gambit

Added some tests. Implementing lists/pairs but not completed.

Gabriano committed Jul 4, 2012
1 parent 61e7f96 commit 085fb697a72ae87566c2981bd8d069300b859a3d
 @@ -0,0 +1,29 @@ +(declare (extended-bindings)) + +(define c1 #\A) +(define c2 #\B) + +(define (test2 x y) + (println (and x y)) + (println (if (and x y) 11 22)) + (println (and (##not x) y)) + (println (if (and (##not x) y) 11 22)) + (println (and x (##not y))) + (println (if (and x (##not y)) 11 22)) + (println (and (##not x) (##not y))) + (println (if (and (##not x) (##not y)) 11 22)) + (println (##not (and x y))) + (println (if (##not (and x y)) 11 22)) + (println (##not (and (##not x) y))) + (println (if (##not (and (##not x) y)) 11 22)) + (println (##not (and x (##not y)))) + (println (if (##not (and x (##not y))) 11 22)) + (println (##not (and (##not x) (##not y)))) + (println (if (##not (and (##not x) (##not y))) 11 22))) + +(define (test x) + (test2 x c1) + (test2 x c2)) + +(test c1) +(test c2)
 @@ -0,0 +1,10 @@ +(declare (extended-bindings) (not safe)) + +(define c1 #\A) +(define notchar 42) + +(define (test x) + (println (##char? x))) + +(test c1) +(test notchar)
 @@ -0,0 +1,15 @@ +(declare (extended-bindings)) + +(define c1 #\A) +(define c2 #\B) + +(define (test2 x y) + (println (##eq? x y)) + (println (if (##eq? x y) 11 22))) + +(define (test x) + (test2 x c1) + (test2 x c2)) + +(test c1) +(test c2)
 @@ -0,0 +1,10 @@ +(declare (extended-bindings)) + +(define c1 #\A) +(define c2 #\B) + +(define (test x) + (println (if x 11 22))) + +(test c1) +(test c2)
 @@ -0,0 +1,10 @@ +(declare (extended-bindings)) + +(define c1 #\A) +(define c2 #\B) + +(define (test x) + (println (if (##not x) 11 22))) + +(test c1) +(test c2)
 @@ -0,0 +1,29 @@ +(declare (extended-bindings)) + +(define c1 #\A) +(define c2 #\B) + +(define (test2 x y) + (println (or x y)) + (println (if (or x y) 11 22)) + (println (or (##not x) y)) + (println (if (or (##not x) y) 11 22)) + (println (or x (##not y))) + (println (if (or x (##not y)) 11 22)) + (println (or (##not x) (##not y))) + (println (if (or (##not x) (##not y)) 11 22)) + (println (##not (or x y))) + (println (if (##not (or x y)) 11 22)) + (println (##not (or (##not x) y))) + (println (if (##not (or (##not x) y)) 11 22)) + (println (##not (or x (##not y)))) + (println (if (##not (or x (##not y))) 11 22)) + (println (##not (or (##not x) (##not y)))) + (println (if (##not (or (##not x) (##not y))) 11 22))) + +(define (test x) + (test2 x c1) + (test2 x c2)) + +(test c1) +(test c2)
 @@ -0,0 +1,2 @@ +(println #\A) +(println #\B)
 @@ -0,0 +1,15 @@ +(declare (extended-bindings)) + +(define f (##not 123)) +(define t (##not f)) +(define c #\A) + +(define (test x) + (println (##char? x)) + (println (if (##char? x) 11 22))) + +(test 0) +(test 1) +(test f) +(test t) +(test c)
 @@ -2,5 +2,5 @@ * Time stamp of last source code repository commit. */ -#define ___STAMP_YMD 20120612 -#define ___STAMP_HMS 162147 +#define ___STAMP_YMD 20120704 +#define ___STAMP_HMS 202448