From 319a8fc344292953f9bfe3b0cd6ca8853343d7c9 Mon Sep 17 00:00:00 2001 From: AJ Rossini Date: Sat, 3 Nov 2007 22:21:19 +0100 Subject: [PATCH] fixed import conflicts (lisp-stat and common-lisp packages). 3 of 4 exs work. --- unittests.lisp | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/unittests.lisp b/unittests.lisp index 1ce815d..40de2ec 100644 --- a/unittests.lisp +++ b/unittests.lisp @@ -12,6 +12,14 @@ (defpackage :lisp-stat-unittests (:use :common-lisp :lift :lisp-stat) + (: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 run-lisp-stat-tests run-lisp-stat-test scoreboard)) (in-package :lisp-stat-unittests) @@ -37,29 +45,29 @@ (ensure-same (+ 1 1) 2)) ;; => # - - -#+nil(progn - ;;; add another test using ensure-error (addtest (lisp-stat-lin-alg) (ensure-error (let ((x 0)) (/ x)))) ;; => # + ;;; add another, slightly more specific test (addtest (lisp-stat) (ensure-condition division-by-zero (let ((x 0)) (/ x)))) ;; => # -(addtest (lisp-stat-lin-alg) - cholesky-decomposition - (ensure-same +(addtest (lisp-stat-lin-alg) cholesky-decomposition + (ensure-same (chol-decomp #2A((2 3 4) (1 2 4) (2 4 5))) - (#2A((1.7888543819998317 0.0 0.0) - (1.6770509831248424 0.11180339887498929 0.0) - (2.23606797749979 2.23606797749979 3.332000937312528e-8)) - 5.000000000000003))) + (values #2A((1.7888543819998317 0.0 0.0) + (1.6770509831248424 0.11180339887498929 0.0) + (2.23606797749979 2.23606797749979 3.332000937312528e-8)) + 5.000000000000003))) + +#+nil(progn + + (addtest (lisp-stat-lin-alg) lu-decomposition -- 2.11.4.GIT