small addition to extract, nothing works even close
[CommonLispStat.git] / unittests-dataclos.lisp
bloba7515ea8f82180646fde8dec6627c41066826779
1 ;;; -*- mode: lisp -*-
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
9 ;;; determined.
11 (in-package :cl-user)
13 (defpackage :lisp-stat-unittests-dataclos
14 (:use :common-lisp :lift :lisp-stat :lisp-stat-unittests)
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 unittest-data))
26 (in-package :lisp-stat-unittests-dataclos)
28 ;;; TESTS
30 (defun run-lisp-stat-tests ()
31 (run-tests :suite 'lisp-stat))
33 (defun run-lisp-stat-test (&rest x)
34 (run-test x))
37 (deftestsuite lisp-stat-dataclos (lisp-stat)
39 (:tests
40 (initdata (ensure-true ))))
44 (deftestsuite lisp-stat-testsupport (lisp-stat)
46 (:tests
47 (almost=1 (ensure (almost= 3 3.001 :tol 0.01)))
51 (addtest (lisp-stat-dataclos) testnameData
52 (ensure-same
53 (dataset (list a b c d) :form (list 2 2))
54 #2A((a b) (c d))
55 :test 'eql))