(if (not (boundp 'T:number)) (progn (setq *load-pathname* (+ '("." "tests" "kl") *load-pathname*)) (load 'test-funcs) )) (if (= 'amiga *machine*) (progn (setq AMIGA t) (putenv "SHELL" "/bin/sh")) (setq AMIGA ()) ) (setq *continue-reading-on-error* t) (defun do-test () ;BEGINNING OF TESTS (E foo Errors:UndefinedVariable) (test list-ref) (T (get '(a b c) 1) 'b) (T (get '(a b c) -1) 'c) (T (get '(a 1 b 2 c 3) 'a) 1) (T (get '(a 1 b 2) 'b) 2) (T (get '(a 1 b 2 c 3) 'a '(? "\x07BUG in list-ref")) 1) (T (get '(a 1 b 2 c 3) 'd ()) ()) (T (get '(a 1 b 2 c 3) 'd '(* 10 5)) 50) (T (get (put '(a b c) 1 3) 1) 3) (T (get (put '(a b c) 4 'e) 3 ()) ()) (T (get (put '(a b c) 4 'e) 4) 'e) (test string-ref) (T (get "abc" 1) #\b) (T (get "abc" 4 0) 0) (T (get "abc" -1) #\c) (T (get "" -1 0) 0) (test list-set) (T (get (put '(a b c) 1 3) 1) 3) (T (get (put '(a b c) 4 'e) 3 ()) ()) (T (get (put '(a b c) 4 'e) 4) 'e) (test list-del) (T (delete () 0) ()) (test string-del) (T (delete (copy "abcdef") 9) "abcdef") (T (delete (copy "abcdef") 0) "bcdef") (T (delete (copy "abcdef") -1) "abcde") (T (delete (copy "abcdef") 6) "abcdef") (T (delete (copy "abcdef") 2) "abdef") (T (delete (copy "abcdef") 5) "abcde") (T (delete (copy "") 0) "") (test typep) (T (typep 'a Atom) Atom) (T (typep 'a Keyword) ()) (T (typep :a Atom) Keyword) (T (typep :a Keyword) Keyword) (T (typep typep Function) Subr) (test list) (T (with (a 1 l '(a 1)) (copy l)) '(a 1)) (T (with (l '(a 1)) (eq l (copy l))) ()) (test catch) (T(+ 2 (catch 'foo (unwind-protect (progn (throw 'foo 1) 2) (setq a 2))) a ) 5 ) (T(+ 2 (catch 'foo (unwind-protect 1 (setq a 2))) a ) 5 ) (test I/O) (T (progn (setq s (copy "")) (with (*standard-output* (open s :type :string :direction :output)) (? "coucou") ) s ) "coucou" ) (T (progn (setq s (copy "foo")) (with (*standard-output* (open s :type :string :direction :output :if-exists :overwrite)) (? "hello") ) s ) "hello" ) (T (progn (setq s (copy "foo")) (with (*standard-output* (open s :type :string :direction :output :if-exists :append)) (? "hello") ) s ) "foohello" ) (T (progn (setq s (copy "foobar")) (with (*standard-output* (open s :type :string :direction :output :if-exists :supersede)) (? "gee") ) s ) "gee" ) (T (progn (setq s (copy "foobar")) (open s :type :string :direction :output :if-exists :supersede) s ) "" ) (T (progn (setq s (copy "foobar")) (with (*standard-output* (open s :type :string :direction :output :if-exists :overwrite)) (? "gee") ) s ) "geebar" ) (test integer) (T 127 +0127) (T 0x1a 26) (test identifier) (test string) (T (= "abc" "ABC") nil) (T "\n" "\x0a") (T "\r" "\x0d") (T "\t" "\x09") (T "\e" "\033") (T "\\" "\134") (T "\"" "\042") (T "\n" "\012") (T "\a" "a") (T "a\ b" "ab") (test chars) (T #\space 32) (T #\backspace 8) (T #\A #x41) (T #\^A 1) (test list) (T '(1 2 3) (list 1 2 (+ 1 2))) (T () (list)) (T () '()) (T () nil) (T (eq () (list)) nil) (T (eq () nil) t) (test backquote) (T `(a) '(a)) (T `() ()) (T `(a ,(+ 1 2) b) '(a 3 b)) (T `(,@'(1)) '(1)) (T `(a ,@'(1 2 3) b) '(a 1 2 3 b)) (T `(a ,@(eq 1 2) b) '(a b)) (T `(a ,@(list 1 2) b) '(a 1 2 b)) (T `(+ ,`(+ ,(+ 1 2) a)) '(+ (+ 3 a))) (T `(1 2 ,(* 9 7)) '(1 2 63)) (setq a '(1 11)) (setq b '(2 22)) (setq c '(3 33)) (setq d '(4 44)) (T `((,a b) ,c ,@d) '(((1 11) b) (3 33) 4 44)) (T `a 'a) (test nil) (write "Functions:") (test system) ;;;(! "ls" "-C" "*.kl" "*.c") ;;;(! "pwd") (test wait) (T (wait (system "sleep 1")) 0) (test operations) (T (mod -27 10) 3) (T (mod 27 10) 7) (T (/ -27 10) -2) (T (* -27 10) -270) (T (+ -27 10) -17) (T (- -27 10) -37) (T (** 3 -1) (/ 1.0 3)) (T (** 4 5) 1024) (test reals) ;(T (< (abs (- 2. (* (expt 2 0.5) (expt 2 0.5)))) 1e-15) t) (test equality) (T (list (= 4 5) (= 5 5) (= 6 5)) '(() 5 ())) (T (list (= "aa" "ab") (= "ab" "ab") (= "ac" "ab")) '(() "ab" ())) (T (list (= "1" 1) (= 'a "a") (= 7 'a)) '(() () ())) (T (list (= "ab" "abc") (= "abc" "abc") (= "abcd" "abc")) '(() "abc" ())) (test inequality) (T (list (/= 4 5) (/= 5 5) (/= 6 5)) '(t () t)) (T (list (/= "aa" "ab") (/= "ab" "ab") (/= "ac" "ab")) '(t () t)) (T (list (/= "1" 1) (/= 'a "a") (/= 7 'a)) '(t t t)) (T (list (/= "ab" "abc") (/= "abc" "abc") (/= "abcd" "abc")) '(t () t)) (test comparison) (T (list (< 4 5) (< 5 5) (< 6 5)) '(t () ())) (T (list (<= 4 5) (<= 5 5) (<= 6 5)) '(t t ())) (T (list (> 4 5) (> 5 5) (> 6 5)) '(() () t)) (T (list (>= 4 5) (>= 5 5) (>= 6 5)) '(() t t)) (test backquote) (test and) (T (and t (= 7 9) (write "problem with and")) ()) (T (and "" (list) "") ()) (T (and "" (list "") "") "") (T (and) t) (T (and 1 2 3) 3) (T (and 1) 1) (test append) (T (+ '(1 2) '(3 4)) '(1 2 3 4)) (T (+ () '(3 4)) '(3 4)) (T (+ '(1 2) ()) '(1 2)) (test boundp) (T (boundp 'boundp) 'boundp) (T (boundp 'zzxxyyywggjh) ()) (test functions) (defun fib (n) (if (< n 2) n (+ (fib (- n 1)) (fib (- n 2))))) (T (fib 10) 55) (E (fib) Errors:BadNumberOfArgs) (E (fib 1 2) Errors:BadNumberOfArgs) (defun noargs () 2) (T (noargs) 2) (test "class functions") (test close) (test coerce) (T (coerce "127" 'Int) 127) (T (typep 127 Int) Int) (T (coerce 127 'Int) 127) (T (coerce 78 'String) "78") (test compare) (T (list (compare 10 20) (compare 20 20) (compare 30 20)) '(-10 0 10)) (T (< (compare "a" "ab") 0) t) (T (compare "ab" "ab") 0) (T (> (compare "abc" "ab") 0) t) (T (compare '(1 2 3) '(1 2 3)) 0) (T (> (compare '(1 2 4) '(1 2 3)) 0) t) (T (> (compare '(1 2 3 4) '(1 2 3)) 0) t) (T (< (compare '(1 2 3) '(1 2 3 4)) 0) t) (if (boundp 'cond) (progn (test cond) (setq a 7) (T (cond ((= a 8) (write "BUG in cond")) ((= a 7) 'ok) ((= a 6) (write "BUG in cond")) (print "BUG in cond")) 'ok) (T (cond ((= a 8) (write "BUG in cond")) ((= a 6) (write "BUG in cond")) ('ok)) 'ok) (T (cond (5)(t 1)) 5) (T (cond (() 1) () (t 6)) 6) )) (test copy) (setq a '(1 2 3)) (T (= a (copy a)) a) (T (eq a (copy a)) ()) (setq a "hello") (T (= a (copy a)) a) (T (eq a (copy a)) ()) (test defclass) (test defmethod) (test defmacro) (defmacro mIF (expression then else) `(if ,expression ,then ,else)) (T (mIF t 'ok (write "BUG in dm")) 'ok) (T (mIF () (write "BUG in dm") 'ok) 'ok) (test defvar) (test defconstant) (defconstant *MY-CONSTANT* 78) (T *MY-CONSTANT* 78) (E (setq *MY-CONSTANT* 7) Errors:CannotSet) (test defun) (defun F (a b) (+ a b)) (T (F 7 (* 8 3)) 31) (defun F (&rest args) (+ (get args 1 ()) (length args))) (T (F 10 20 30) 23) (defunq F (a b) (+ a (eval b))) (T (F (1 2) (+ '(3) '(4 5))) '(1 2 3 4 5)) (T ((lambda (a b &key e (c 23) ((d dd) 10)) (list a b c e dd)) 1 2 :c 6 :d 8 :e 1) '(1 2 6 1 8) ) (defun foo (&rest r &whole w) (list w r)) (T (foo (+ 1 2)) '((foo (+ 1 2)) (3))) (T (foo (+ 1 2) (setq a 1)) '((foo (+ 1 2) (setq a 1)) (3 1))) (test optional-and-rest) (T ((lambda (a b) (+ a (* b 3))) 4 5) 19) (T ((lambda (a &optional (b 2)) (+ a (* b 3))) 4 5) 19) (T ((lambda (a &optional (b 2)) (+ a (* b 3))) 4) 10) (defun foo (&optional (a 2) (c 3) &rest x) (list a c x)) (T (foo) '(2 3 ())) (T (foo 6) '(6 3 ())) (T (foo 6 3) '(6 3 ())) (T (foo 6 3 8) '(6 3 (8))) (T (foo 6 3 8 9 10 11) '(6 3 (8 9 10 11))) (test lambda-keywords) (defun foo (a b &key c d) (list a b c d)) (T (foo 1 2) '(1 2 () ())) (T (foo 1 2 :c 6) '(1 2 6 ())) (T (foo 1 2 :d 8) '(1 2 () 8)) (T (foo 1 2 :c 6 :d 8) '(1 2 6 8)) (T (foo 1 2 :d 8 :c 6) '(1 2 6 8)) (T (foo :a 1 :d 8 :c 6) '(:a 1 6 8)) (T (foo :a :b :c :d) '(:a :b :d ())) (test mixed-lambda-keywords) (defun foo (a &optional (b 3) &rest x &key c (d a)) (list a b c d x)) (T (foo 1) '(1 3 () 1 ())) (T (foo 1 2) '(1 2 () 1 ())) (T (foo :c 7) '(:c 7 () :c ())) (T (foo 1 6 :c 7) '(1 6 7 1 (:c 7))) (T (foo 1 6 :d 8) '(1 6 () 8 (:d 8))) (T (foo 1 6 :d 8 :c 9) '(1 6 9 8 (:d 8 :c 9))) (makunbound 'foo) (test delete) (setq l (copy '(0 10 20 30 40))) (T (delete l 1) '(0 20 30 40)) (T l '(0 20 30 40)) (T (delete l 127) '(0 20 30 40)) (T l '(0 20 30 40)) (T (delete l 0) '(20 30 40)) (T (delete l -1) '(20 30)) (T (delete l 1) '(20)) (if (boundp 'do) (progn (test do) (T (with (total 0) (do ((a (- (+ 3 2) 5) (+ a 1))) ((= a 4) total) (incf total a)) ) 6 ) (setq a (copy "")) (setq stream (open a :type :string :direction :output)) (with (*standard-output* stream) (do* ((i 1 (+ i 1)) (j i i)) ((> i 3)) (? i) (? j)) ) (T a "112233") (setq a (copy "")) (setq stream (open a :type :string :direction :output)) (with (*standard-output* stream) (do ((i 1 (+ i 1)) (j 1 (+ i 1))) ((> i 3)) (? i) (? j)) ) (T a "112233") (setq a (copy "")) (setq stream (open a :type :string :direction :output)) (with (*standard-output* stream) (do* ((i 1 (+ i 1)) (j 1 (+ i 1))) ((> i 3)) (? i) (? j)) ) (T a "112334") (makunbound 'a) (T (with (total 0) (do ((a (- (+ 3 2) 5) (+ a 1))) ((= a 4) total) (incf total a)) ) 6 ) (setq a 1) (T (with (total 0) (do ((a (- (+ 3 2) 5) (+ a 1))) ((= a 4) total) (incf total a)) ) 6 ) (T (with (total 0) (do ((b) (c 0) (a (- (+ 3 2) 5) (+ a 1))) ((= a 4) total) (incf total a)) ) 6 ) )) (test dolist) (T (with (total 0) (dolist (a '(1 2 3) total) (incf total a))) 6) (T (with (total 0) (dolist (a '(1 2 3) 1 total) (incf total a))) 6) (T (with (total 0) (dolist (a ()) (+ total a))) ()) (T (with (total 0) (dolist (a () 1) (+ total a))) 1) (T (with (total 0) (dolist (a "abcdef" total) (incf total a))) 597) (T (with (total 0) (dolist (a "" total) (incf total a))) 0) (test dotimes) (T (with (total 0) (dotimes (a (+ 2 2) total) (incf total a))) 6) ;; eq already tested... (test equal) (T '((a b) (cd)) '((a b) (cd))) (test eval) (T (eval '(* 9 8)) 72) (test execute-string) (T (execute-string "(+ 1 2)") 3) (test gensym) (test getenv) (T (= (match "^[/].*sh" (getenv "SHELL")) ()) ()) (T (getenv "ZZzzXygjsdf") ()) (test putenv) (T (putenv "FSPT_XYZ" "abcde") "abcde") (T (getenv "FSPT_XYZ") "abcde") (test if) (T (if (= 1 2) (write "BUG in if") 'ok) 'ok) (T (if (= 2 2) 'ok (write "BUG in if")) 'ok) (test intern) (T (eq (intern "a") 'a) t) (test length) (T (length '(1 2 3 4)) 4) (T (length ()) 0) (T (length "abc") 3) (T (length "") 0) (if (boundp 'let) (progn (test let) (setq a 1) (setq b 2) (T (let ((a 10) (b 20)) (- a b)) -10) (T (- a b) -1) (T (let ((a b) (b a)) b) 1) (T (let* ((a b) (b a)) b) 2) )) (test list) (T (list (* 10 1) (* 5 4) (* 2 15)) '(10 20 30)) (T (list) ()) ;; load already tested... (test *load-patname*) (test bitwise) (T (logand 13 37) 5) (T (logand 3 5) 1) (T (logior 5 12) 13) (T (logior 1 4) 5) (T (logxor 37 12) 41) (T (logxor 3 5) 6) (T (lognot -3) 2) (T (lognot 5) -6) (test make-list) (T (make-list 3) '(() () ())) (T (make-list 4 :initial-element 1) '(1 1 1 1)) (T (make-list -1) ()) (T (make-list 0) ()) (test map) (T (map String (lambda (up char) (if up (- char 32) char)) '(t () () ()) "foo" ) "Foo" ) (T (map 'String (lambda (up char) (if up (- char 32) char)) '(t () () ()) "foo" ) "Foo" ) (test plist) (setq l (copy '(a 1 "foo" 2 ("foo" 1991) 3))) (T (get l "foo") 2) (T (get l "bar" '(+ 1 2)) 3) (T (get l 'a) 1) (T (get l (list "foo" (+ 1990 1))) 3) (test hashtable) (setq l (copy '(a 1 "foo" 2 ("foo" 1991) 3))) (setq ht (coerce l Hashtable)) (T (get ht "foo") 2) (T (get ht "bar" '(+ 1 2)) 3) (T (get ht 'a) 1) (T (get ht (list "foo" (+ 1990 1))) 3) (T (eqset-plist (coerce (delete (copy (coerce '(a 1 b 2 c 3) Hashtable)) 'b) List) '(c 3 a 1)) t ) (T (eqset-plist (coerce (delete(coerce '(a 1 b 2 c 3) Hashtable) 'b) List) '(c 3 a 1)) t ) (test dohash) (setq l (copy '(a 1 b 2 c 3))) (setq ht (coerce l Hashtable)) (T (progn (setq res 0) (dohash (k v ht) (setq res (+ res v))) res) 6) (T (progn (setq res "")(dohash (k v ht) (setq res (+ res k))) (catch 'Found (map () (lambda (elt) (if (= elt res) (throw 'Found t))) '("abc" "acb" "bca" "bac" "cab" "cba") ) ()) ) t) (T (progn (setq res 0)(dohash (k v l) (setq res (+ res v))) res) 6) (T (progn (setq res "")(dohash (k v l) (setq res (+ res k))) res) "abc") (T (with (total 0) (dohash (k v '(a 1 b 2 c 3)) (incf total v)) total) 6) (T (with (total 0) (dohash (k v '(#\a 1 #\b 2 #\c 3)) (incf total k)) total) 294) (test regular_expressions) (T (match "=*([0-9]*)x([0-9]*)([-+][0-9]*)([-+][0-9]*)" "=80x24+100+150" 3 4 1 2) '("+100" "+150" "80" "24") ) (T (setq re (regcomp "=*([0-9]+)x([0-9]+)([-+][0-9]+)([-+][0-9]+)")) "=*([0-9]+)x([0-9]+)([-+][0-9]+)([-+][0-9]+)" ) (T (regexec re "=80x-24+100+150") ()) (T (regexec re "=80x24+100+150") t) (T (get re 0) '(0 14)) (T (get re 1) '(1 3)) (T (get re 2) '(4 6)) (T (get re 4) '(10 14)) (T (get re 5 ()) ()) (T (regsub re 1) "80") (T (regsub re "\\2") "24") (T (regsub re 1000) "") (T (regsub re 0) "=80x24+100+150") (test seek) (T (seek '( 0 10 20 30 40) 20) 2) (T (seek '( 0 10 20 30 40) 2) ()) (T (seek "abcdef" "cd") 2) (T (seek "abcdef" "gh") ()) (test min) (T (min -1 -4 -2 10) -4) (test max) (T (max -1 -4 -2 10) 10) (test not) (T (not ()) t) (T (not t) ()) (T (not 234) ()) (test or) (T (or () 8 (write "problem with or")) 8) (T (or (= 1 2) (= 2 1)) ()) (test open) (setq a (copy "")) (setq stream (open a :type :string :direction :output)) (write (+ "abc" "def") stream) (T a "abcdef") (write (* 8 9) stream) (with (*standard-output* stream) (write "bye")) (T a "abcdef72bye") (test *standard-error*) (test *standard-input*) (test close) (close stream) (E (write (+ 8 9) stream) Errors:StreamError) (T a "abcdef72bye") (test *print-readably*) (test progn) (setq a 1) (T (progn (setq a (* a 2)) (setq a (* a 2)) a) 4) (test require) (test provide) (test random) (test read) (test read-char) (test write-char) (test read-line) (test write-line) (test reverse) (test set) (setq ab 7) (setq x 'ab) (set x 12) (T ab 12) (test sort) (T (sort '("bc" "ab" "cf" "cd") compare) '("ab" "bc" "cd" "cf")) (test string-upcase) (test string-downcase) (test subseq) (T (subseq '(1 2 3 4) 1 3) '(2 3)) (T (subseq '(1 2 3 4) 1) '(2 3 4)) (T (subseq '(1 2 3 4) 3 1) ()) (T (subseq '(1 2 3 4) -1 1) '(() 1)) (T (subseq "abcd" 1 3) "bc") (T (subseq "abcd" 1) "bcd") (test replace-seq) (defun replace-string (s re n rep &aux (rec (regcomp re)) ) (if (regexec rec s) (with (m (get rec n)) (replace-seq (copy s) rep #[m 0] #[m 1]) ) )) (T (replace-string "The klone language" "klone" 0 "wool") "The wool language" ) (T (replace-string "The klone language" "klone" 0 "") "The language" ) (T (replace-string "The klone language" "klone" 0 "best to date") "The best to date language" ) (T (replace-string "The wool language" "wool" 0 "klone") "The klone language" ) (T (replace-string "The wool language" "wool" 0 "klon") "The klon language" ) (T (replace-seq (copy "") "abc" 0 0) "abc") (T (replace-seq "" "" 0 0) "") (E (replace-seq "" "" 1 1) Errors:NumberOutOfRange) (E (replace-seq "abc" "" 1 0) Errors:NumberOutOfRange) (T (replace-seq (list 1 2 3 4 5 6 7) '(a b c) 1 4) '(1 a b c 5 6 7)) (T (replace-seq (list 1 2 3 4 5 6 7) '(a b) 1 4) '(1 a b 5 6 7)) (T (replace-seq (list 1 2 3 4 5 6 7 8 9) '(a b) 1 4) '(1 a b 5 6 7 8 9)) (T (replace-seq (list 1 2 3 4 5 6 7 8 9) '() 1 4) '(1 5 6 7 8 9)) (T (replace-seq (list 1 2 3 4 5 6 7 8 9) '(a b c d e f g) 1 4) '(1 a b c d e f g 5 6 7 8 9)) (T (replace-seq (list 1 2 3 4 5 6 7) '(a b c d) 1 4) '(1 a b c d 5 6 7)) ;; t already tested... (test get-internal-run-time) ;(test some) ;(T (some 'typep '(a b c d 2 e) '(Int)) Int) ;(T (some 'typep '(a b c d e) '(Int)) ()) (test trace-level) (test trace-all) (test type-of) (T (type-of 89) Int) (T (type-of "hell") String) (T (type-of 'hggfhgf) Atom) (test makunbound) (test with) (test addition) (T (+ 'a "b" 'c "d") "abcd") (T (+ "a" "b" 'c 'd) "abcd") (T (+ '(0 1) '(2) '(3 4)) '(0 1 2 3 4)) (T (+ 1 2 3) 6) (test nconc) (setq s (copy "")) (T (nconc s "abc") "abc") (T (nconc s "23" "" "a") "abc23a") (T (nconc s) "abc23a") (setq l (copy ())) (T (nconc l '(1 2 3) (list 'a 'b 'c)) '(1 2 3 a b c)) (T (nconc l () '(foo)) '(1 2 3 a b c foo)) ;;; MISC (test fib) (defun fib (n) (if (< n 2) n (+ (fib (- n 1)) (fib (- n 2))))) (T (fib 1) 1) (T (fib 2) 1) (T (fib 10) 55) (E foo Errors:UndefinedVariable) ;; soft links (test links) (setq l (link-set (+ 67 0))) (T (link-get l) ()) (T (link-get l) ()) (setq l (link-set 'a)) (T (link-get l) 'a) (T (link-get 'a) 'a) (test directory) (setq dirc (list)) (with (fd ()) (if AMIGA (system '("bin:ls" "-1a") :output 'fd) (system '("ls" "-1a") :output 'fd) ) (if (seek '(alpha) *machine*) (select () :timeout 500) ;bug in OSF/1 ) (catch 'EOF (while t (setq s (read-line fd)) (put dirc -1 s) )) (if (not dirc) ; old SYSV ==> no -1 option (progn (system "ls -a|cat" :output 'fd) (catch 'EOF (while (setq s (read-line fd)) (put dirc -1 s) )))) ) (T (sort (+ '("." "..") (directory)) compare) dirc ) (if (boundp 'ExObject) (progn (test exo) (load 'test-objects) )) (if (boundp 'Locator) (progn (test locators) (T #[#(1 2 3) 1] 2) (T (setq #[#(1 2 3) 1] 42) 42) (T (progn (setq l (list 1 2 3)) (setq #[l 1] 45) l) '(1 45 3)) (setq p #(:x 0 :y 1)) (setq #[p :x] (list 1 2 3)) (T #[p :x 0] 1) (T #[p :x -1] 3) (T #[p :x 4] ()) (T (progn (setq #[p :x 4] 34) #[p :x]) '(1 2 3 () 34)) )) (if (boundp 'Accessor) (progn (test accessors) (T #(1 2 3).1 2) (T (setq #(1 2 3).1 42) 42) (T (progn (setq l (list 1 2 3)) (setq l.1 45) l) '(1 45 3)) (setq p #(:x 0 :y 1)) (setq p.:x (list 1 2 3 4)) (T p.:x.0 1) (T p.:x.-1 4) (T p.:x.4 ()) (E p.:x.a Errors:NoElement) (T (progn (setq p.:x.5 34) p.:x) '(1 2 3 4 () 34)) )) (if (boundp 'Assign) (progn (test assigns) (makunbound 'x) (T x = 23 23) (T x 23) (T (progn x = 78 x) 78) (T (progn x = y = z = (+ 8 9) (list x y z)) '(17 17 17)) )) (if (and (boundp 'ses:load) (file-stats "ses_calc")) (load "test-ses") ) ) ; END OF TESTS (? "******************************************************************** PASS " T:pass "\n") (setq T:t0 (get-internal-run-time)) (do-test) (setq T:t0 (- (get-internal-run-time) T:t0)) (setq T:pass (+ T:pass 1)) (? "******************************************************************** PASS " T:pass "\n") (setq T:t1 (get-internal-run-time)) (do-test) (setq T:t1 (- (get-internal-run-time) T:t1)) (if (boundp 'mcheck) ;check memory damages (if (not (mcheck)) (? "memory not trashed\n") (? "\x07MEMORY TRASHED!\n") )) (test-end)