From: Luke Lau Date: Sat, 27 Jul 2019 23:04:49 +0000 (+0100) Subject: Add a bunch more tests X-Git-Url: https://git.lukelau.me/?p=scheme.git;a=commitdiff_plain;h=e54e48a7b5600667652cde53797d386ec6bc357b Add a bunch more tests --- diff --git a/tests.scm b/tests.scm index 0e70480..4ff6d76 100644 --- a/tests.scm +++ b/tests.scm @@ -54,3 +54,8 @@ ; passing builtins about (test-prog '((lambda (x) ((lambda (a b) (a b 3)) + x)) 3) 6) +(test-prog '(bool->int ((lambda (x) (x #f)) !)) 1) +(test-prog '((lambda (f) (f #t)) bool->int) 1) +(test-prog-stdout '(let () ((lambda (f) (f "foo")) print) 0) "foo") +(test-prog '((lambda (f) (f 3 3)) (lambda (x y) (bool->int (= x y)))) 1) +(test-prog '(bool->int ((lambda (f) (! (f 2 3))) =)) 1)