From f8f81ee9a25403cc6e094dd016e1ee8e2e331f52 Mon Sep 17 00:00:00 2001 From: tony Date: Thu, 24 Apr 2008 10:07:19 +0200 Subject: [PATCH] moved unit tests to main file to facilitate testing and development. --- data-clos.lisp | 55 ++++++++++++++++++++++++++++++++++++++++++ unittests-dataclos.lisp | 64 +++++-------------------------------------------- 2 files changed, 61 insertions(+), 58 deletions(-) rewrite unittests-dataclos.lisp (85%) diff --git a/data-clos.lisp b/data-clos.lisp index 4345f92..5c302d2 100644 --- a/data-clos.lisp +++ b/data-clos.lisp @@ -310,3 +310,58 @@ my-ds-2 (caseNames my-ds-2) (ignore-errors (setf (caseNames my-ds-2) (list "a" "b" 4 5))) (setf (caseNames my-ds-2) origCaseNames) + + +;;; This is semi-external to lispstat core packages. The dependency +;;; should be that lispstat packages are dependencies for the unit +;;; tests. However, where they will end up is still to be +;;; determined. + +(in-package :cl-user) + +(defpackage :lisp-stat-unittests-dataclos + (:use :common-lisp :lift :lisp-stat :lisp-stat-unittests) + (:shadowing-import-from :lisp-stat + slot-value call-method call-next-method ;; objects + expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan ;; lsmath + asin acos atan sinh cosh tanh asinh acosh atanh float random + truncate floor ceiling round minusp zerop plusp evenp oddp + < <= = /= >= > ;; complex + conjugate realpart imagpart phase + min max logand logior logxor lognot ffloor fceiling + ftruncate fround signum cis) + (:export unittest-data)) + +(in-package :lisp-stat-unittests-dataclos) + +;;; TESTS + +(defun run-lisp-stat-tests () + (run-tests :suite 'lisp-stat)) + +(defun run-lisp-stat-test (&rest x) + (run-test x)) + + +(deftestsuite lisp-stat-dataclos (lisp-stat) + () + (:tests + (initdata (ensure-true )))) + + + +(deftestsuite lisp-stat-testsupport (lisp-stat) + () + (:tests + (almost=1 (ensure (almost= 3 3.001 :tol 0.01))) + + + +(addtest (lisp-stat-dataclos) testnameData + (ensure-same + (dataset (list a b c d) :form (list 2 2)) + #2A((a b) (c d)) + :test 'eql)) + + +o \ No newline at end of file diff --git a/unittests-dataclos.lisp b/unittests-dataclos.lisp dissimilarity index 85% index a7515ea..0663f04 100644 --- a/unittests-dataclos.lisp +++ b/unittests-dataclos.lisp @@ -1,58 +1,6 @@ -;;; -*- mode: lisp -*- -;;; Copyright (c) 2007, by A.J. Rossini -;;; See COPYRIGHT file for any additional restrictions (BSD license). -;;; Since 1991, ANSI was finally finished. Edited for ANSI Common Lisp. - -;;; This is semi-external to lispstat core packages. The dependency -;;; should be that lispstat packages are dependencies for the unit -;;; tests. However, where they will end up is still to be -;;; determined. - -(in-package :cl-user) - -(defpackage :lisp-stat-unittests-dataclos - (:use :common-lisp :lift :lisp-stat :lisp-stat-unittests) - (:shadowing-import-from :lisp-stat - slot-value call-method call-next-method ;; objects - expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan ;; lsmath - asin acos atan sinh cosh tanh asinh acosh atanh float random - truncate floor ceiling round minusp zerop plusp evenp oddp - < <= = /= >= > ;; complex - conjugate realpart imagpart phase - min max logand logior logxor lognot ffloor fceiling - ftruncate fround signum cis) - (:export unittest-data)) - -(in-package :lisp-stat-unittests-dataclos) - -;;; TESTS - -(defun run-lisp-stat-tests () - (run-tests :suite 'lisp-stat)) - -(defun run-lisp-stat-test (&rest x) - (run-test x)) - - -(deftestsuite lisp-stat-dataclos (lisp-stat) - () - (:tests - (initdata (ensure-true )))) - - - -(deftestsuite lisp-stat-testsupport (lisp-stat) - () - (:tests - (almost=1 (ensure (almost= 3 3.001 :tol 0.01))) - - - -(addtest (lisp-stat-dataclos) testnameData - (ensure-same - (dataset (list a b c d) :form (list 2 2)) - #2A((a b) (c d)) - :test 'eql)) - - - \ No newline at end of file +;;; -*- mode: lisp -*- +;;; Copyright (c) 2007, by A.J. Rossini +;;; See COPYRIGHT file for any additional restrictions (BSD license). +;;; Since 1991, ANSI was finally finished. Edited for ANSI Common Lisp. + +b \ No newline at end of file -- 2.11.4.GIT