From d974ef887c1e657e054105d8378f1f9298cf551c Mon Sep 17 00:00:00 2001 From: AJ Rossini Date: Mon, 5 Nov 2007 13:23:54 +0100 Subject: [PATCH] testsupport unit tests work and verify numerical equality approach. --- ls-demo.lisp | 1 + unittests.lisp | 19 ++++++++----------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/ls-demo.lisp b/ls-demo.lisp index d109e0e..7611f2f 100644 --- a/ls-demo.lisp +++ b/ls-demo.lisp @@ -219,6 +219,7 @@ my-chol-decomp-test (run-tests :suite 'lisp-stat) (describe (run-tests :suite 'lisp-stat)) +(describe (run-tests :suite 'lisp-stat-testsupport)) (run-tests :suite 'lisp-stat-probdistn) (describe (run-tests :suite 'lisp-stat-probdistn)) diff --git a/unittests.lisp b/unittests.lisp index 0b55b91..2c12a25 100644 --- a/unittests.lisp +++ b/unittests.lisp @@ -66,17 +66,14 @@ (deftestsuite lisp-stat-testsupport (lisp-stat) () (:tests - (;; almost= - ((ensure (almost= 3 3.001 :tol 0.01))) - ((ensure (almost= 3 3.01 :tol 0.01))) - ((ensure (not (almost= 3 3.1 :tol 0.01)))) - ;; almost=lists-1 - ((ensure (almost=lists nil nil :tol 0.01))) - ((ensure (almost=lists (list ) (list ) :tol 0.01))) - ((ensure (almost=lists (list 1.0) (list 1.0) :tol 0.01))) - ((ensure (almost=lists (list 1.0 1.0) (list 1.0 1.0) :tol 0.01))) - ((ensure (not (almost=lists (list 1.0 1.0) (list 1.0 1.1) :tol 0.01))))))) - + (almost=1 (ensure (almost= 3 3.001 :tol 0.01))) + (almost=2 (ensure (almost= 3 3.01 :tol 0.01))) + (almost=3 (ensure (not (almost= 3 3.1 :tol 0.01)))) + (almost=lists1 (ensure (almost=lists nil nil :tol 0.01))) + (almost=lists2 (ensure (almost=lists (list ) (list ) :tol 0.01))) + (almost=lists3 (ensure (almost=lists (list 1.0) (list 1.0) :tol 0.01))) + (almost=lists4 (ensure (almost=lists (list 1.0 1.0) (list 1.0 1.0) :tol 0.01))) + (almost=lists5 (ensure (not (almost=lists (list 1.0 1.0) (list 1.0 1.1) :tol 0.01)))))) -- 2.11.4.GIT