Unit-testing for data structures and numerics cleaned up.
[CommonLispStat.git] / src / unittests / unittests-listoflist.lisp
blobb663fa6c408d51f095839337c622d02c58466c5c
1 ;;; -*- mode: lisp -*-
3 ;;; Time-stamp: <2009-04-15 08:53:25 tony>
4 ;;; Creation: <2009-04-15 08:43:02 tony>
5 ;;; File: unittests-listoflist.lisp
6 ;;; Author: AJ Rossini <blindglobe@gmail.com>
7 ;;; Copyright: (c)2009--, AJ Rossini. BSD, LLGPL, or GPLv2, depending
8 ;;; on how it arrives.
9 ;;; Purpose: unittests for the listoflist handling.
12 ;;; What is this talk of 'release'? Klingons do not make software
13 ;;; 'releases'. Our software 'escapes', leaving a bloody trail of
14 ;;; designers and quality assurance people in its wake.
16 (in-package :lisp-stat-unittests)
18 (deftestsuite lisp-stat-ut-listoflist (lisp-stat-ut)
19 ((my-df-1
20 (make-instance 'dataframe-array
21 :storage #2A((1d0 2d0 3d0 4d0)
22 (10d0 20d0 30d0 40d0))
23 :doc "This is an interesting legal dataframe-array"
24 :case-labels (list "x" "y")
25 :var-labels (list "a" "b" "c" "d" "e")))
26 (my-matlike-1
27 (make-matrix 2 4
28 :initial-element 0d0))
29 (my-lol-1 '((0d0 1d0 2d0 3d0)
30 (10d0 11d0 12d0 13d0)))))
33 ;;; Listoflist tests
35 (addtest (lisp-stat-ut-listoflist) lol-equalp
36 (ensure
37 (equalp (dataset (make-instance 'dataframe-array
38 :storage #2A(('a 'b)
39 ('c 'd))))
40 #2A(('a 'b)
41 ('c 'd)))))
43 (addtest (lisp-stat-ut-listoflist) lol-consdata
44 (ensure
45 (consistent-dataframe-p my-df-1)))
48 ;;;
49 ;; (run-tests)
50 ;; (describe (run-tests))