2 ;;; Copyright (c) 2007, by A.J. Rossini <blindglobe@gmail.com>
3 ;;; See COPYRIGHT file for any additional restrictions (BSD license).
4 ;;; Since 1991, ANSI was finally finished. Edited for ANSI Common Lisp.
6 ;;; This is semi-external to lispstat core packages. The dependency
7 ;;; should be that lispstat packages are dependencies for the unit
8 ;;; tests. However, where they will end up is still to be
13 (defpackage :lisp-stat-unittests
14 (:use
:common-lisp
:lift
:lisp-stat
)
15 (:shadowing-import-from
:lisp-stat
16 slot-value call-method call-next-method
;; objects
17 expt
+ -
* / ** mod rem abs
1+ 1- log exp sqrt sin cos tan
;; lsmath
18 asin acos atan sinh cosh tanh asinh acosh atanh float random
19 truncate floor ceiling round minusp zerop plusp evenp oddp
20 < <= = /= >= > ;; complex
21 conjugate realpart imagpart phase
22 min max logand logior logxor lognot ffloor fceiling
23 ftruncate fround signum cis
)
24 (:export run-lisp-stat-tests run-lisp-stat-test scoreboard
; exec
25 almost
= almost
=lists numerical
=)) ; compare
27 (in-package :lisp-stat-unittests
)
31 (defun run-lisp-stat-tests ()
32 (run-tests :suite
'lisp-stat
))
34 (defun run-lisp-stat-test (&rest x
)
37 (deftestsuite lisp-stat-proto
(lisp-stat) ())
39 ;;;; Object System tests
41 ;;(deftestsuite lisp-stat-proto-objects (lisp-stat)
43 ;; (:documentation "Make sure the proto object system is valid.")
45 ;; (create-proto (ensure (object-proto-p (defproto test-me))))
46 ;; (create-proto2 (ensure (object-proto-p (defproto2 test-me2))))
47 ;; (instance1 (ensure (send test-me :isnew)))
48 ;; (instance1-2 (ensure (send test-me2 :isnew)))
49 ;; (instance2 (ensure (send test-me :has-slot 'new)))
50 ;; (instance2-2 (ensure (send test-me2 :has-slot 'new)))
52 ;; (instance5 (ensure (send test-me :has-slot 'new)))
53 ;; (instance5-2 (ensure (send test-me2 :has-slot 'new)))
54 ;; (instance5 (ensure (send test-me :own-slots 'new)))
55 ;; (instance5-2 (ensure (send test-me2 :own-slots 'new)))
56 ;; (instance5 (ensure (send test-me :has-slot 'new)))
57 ;; (instance5-2 (ensure (send test-me2 :has-slot 'new)))
58 ;; (instance5 (ensure (send test-me :has-slot 'new)))
59 ;; (instance5-2 (ensure (send test-me2 :has-slot 'new)))