bldc/tests/test_arith_stress_2.lisp

18 lines
342 B
Common Lisp

(defun apply (f args)
(eval (cons f args)))
(defun test-it (n c args res acc)
(if (= n 0) acc
(progn
(define acc (and acc (= (apply c args) res)))
(test-it (- n 1) c args res acc))))
(defun arith (a b c d e f g h i j)
(* a b c d e f g h i j))
(def res (test-it 10000 arith '(1 2 3 4 5 6 7 8 9 10) 362880 t))
(check res)