From 6b2c0bbe7c30724077da56014113d1cbac04c9e4 Mon Sep 17 00:00:00 2001 From: AJ Rossini Date: Sat, 5 Jul 2008 19:08:19 +0200 Subject: [PATCH] updated LIFT unit test structure, fixed rename errors. cleaned up demos. --- lift-standard.config | 27 +++++++++ ls-demo.lisp | 32 ++++++----- test-style.css | 152 +++++++++++++++++++++++++++++++++++++++++++++++++++ unittests.lisp | 8 +-- 4 files changed, 200 insertions(+), 19 deletions(-) create mode 100644 lift-standard.config create mode 100644 test-style.css diff --git a/lift-standard.config b/lift-standard.config new file mode 100644 index 0000000..23fa58c --- /dev/null +++ b/lift-standard.config @@ -0,0 +1,27 @@ +;;; configuration for LIFT tests + +;; settings +(:if-dribble-exists :supersede) +(:dribble "lift.dribble") +(:print-length 10) +(:print-level 5) +(:print-test-case-names t) +(:log-pathname t) + +;; suites to run +(lift-test) + +;; report properties +(:report-property :title "CLS | Test results") +(:report-property :relative-to lift-test) + +(:report-property :style-sheet "test-style.css") +(:report-property :if-exists :supersede) +(:report-property :format :html) +(:report-property :name "test-results/test-report.html") +(:report-property :unique-name t) +(:build-report) + +(:report-property :format :describe) +(:report-property :full-pathname *standard-output*) +(:build-report) diff --git a/ls-demo.lisp b/ls-demo.lisp index 74604ed..39becd8 100644 --- a/ls-demo.lisp +++ b/ls-demo.lisp @@ -3,7 +3,7 @@ ;;; See COPYRIGHT file for any additional restrictions (BSD license). ;;; Since 1991, ANSI was finally finished. Edited for ANSI Common Lisp. -;;; Time-stamp: <2008-07-04 22:00:00 tony> +;;; Time-stamp: <2008-07-05 19:06:01 tony> ;;; Creation: <2007-01-01 09:21:50 user> WRONG ;;; File: ls-demo.lisp ;;; Author: AJ Rossini @@ -242,22 +242,22 @@ my-chol-decomp-test (last-test-status) ;;(failures) -(describe (run-tests :suite 'lisp-stat-testsupport)) -(describe (run-tests :suite 'lisp-stat-testsupport2)) +(describe (run-tests :suite 'lisp-stat-ut-testsupport)) +(describe (run-tests :suite 'lisp-stat-ut-testsupport2)) -(testsuite-tests 'lisp-stat) -(run-tests :suite 'lisp-stat) -(describe (run-tests :suite 'lisp-stat)) +(testsuite-tests 'lisp-stat-ut) +(run-tests :suite 'lisp-stat-ut) +(describe (run-tests :suite 'lisp-stat-ut)) -(run-tests :suite 'lisp-stat-probdistn) -(describe (run-tests :suite 'lisp-stat-probdistn)) -(run-tests :suite 'lisp-stat-spec-fns) +(run-tests :suite 'lisp-stat-ut-probdistn) +(describe (run-tests :suite 'lisp-stat-ut-probdistn)) +(run-tests :suite 'lisp-stat-ut-spec-fns) (describe (run-tests :suite 'lisp-stat-spec-fns)) -(find-testsuite 'lisp-stat-lin-alg) -(testsuite-tests 'lisp-stat-lin-alg) -(run-tests :suite 'lisp-stat-lin-alg) -(describe (run-tests :suite 'lisp-stat-lin-alg)) +(find-testsuite 'lisp-stat-ut-lin-alg) +(testsuite-tests 'lisp-stat-ut-lin-alg) +(run-tests :suite 'lisp-stat-ut-lin-alg) +(describe (run-tests :suite 'lisp-stat-ut-lin-alg)) ;;;; Data Analysis test @@ -327,14 +327,16 @@ iron ;;; FIXME: need to get multiple-linear regression working -- clearly ;;; simple linear is working above! (defvar m nil "holding variable.") -(def m (regression-model (list iron aluminum) absorbtion :print nil)) +(def m (regression-model (list iron aluminum) absorbtion :print nil)) (send m :compute) (send m :sweep-matrix) (format t "~%~A~%" (send m :sweep-matrix)) (send m :display) ;; ERROR... (def m (regression-model (bind-columns iron aluminum) absorbtion)) (send m :help) -(send m :help 'display) +(send m :help :display) +(send m :help :basis) + (send m :plot-residuals) diff --git a/test-style.css b/test-style.css new file mode 100644 index 0000000..f076075 --- /dev/null +++ b/test-style.css @@ -0,0 +1,152 @@ +body { + background: white; + margin: 2px; + padding-left: 3em; + padding-right: 3em; +} + +h3 { + clear: both; + float: none; +} + +#summary { + font-size: 80%; +} + +#summary h2 { +} + +#results { + float: left; + clear: both; +} + +.testsuite { + margin-left: 1em; + padding-left: 1em; + margin-right: 1em; + padding-right: 1em; +} + +.testsuite-title { + font-size: 115%; + font-weight: bold; + margin-top: 0.50em; + margin-bottom: 0.25em; + vertical-align: top; + clear: both; +} + +.testsuite-title table { + vertical-align: top; + width: 100%; +} + +.testsuite-test-count { + text-transform: none; + text-align: right; +} + +.testsuite-summary { + width: 150px; + text-align: right; +} + +.testsuite-all-passed { + +} + +.test-case { + margin-right: 1em; + margin-left: 1em; + clear: left; + float: none; +} + +.testsuite-some-failures { + border-left-style: solid; + border-right-style: solid; + border-color: blue; +} + +.testsuite-some-errors { + border-left-style: solid; + border-right-style: solid; + border-color: red; +} + +.test-error { + float: right; + clear: right; + color: red; +} + +.test-failure { + float: right; + clear: right; + color: blue; +} + +#problem-summary { + float: left; + clear: both; +} + +#problem-summary body { + float: none; +} + +#failure-summary { + margin-left: 1em; + margin-right: 1em; +} + +#failure-summary h3 { + font-style: italic; + font-weight: bold; +} + +#error-summary { + margin-left: 1em; + margin-right: 1em; +} + +#error-summary h3 { + font-style: italic; + font-weight: bold; +} + +#footer { + padding-top: 2em; + text-align: right; + font-size: medium; + color: gray; + clear: both; +} + +.test-name { + float: left; + clear: none; + display: block; + width: 255px; + overflow: hidden; + height: 1.25em; +} + +.test-time { + float: left; + padding-left: 20px; + text-align: right; + display: run-in; + width: 35px; +} + +.test-space { + padding-left: 20px; + text-align: right; + float: left; + clear: none; + display: block; + width: 70px; +} \ No newline at end of file diff --git a/unittests.lisp b/unittests.lisp index c7c65bd..abd6432 100644 --- a/unittests.lisp +++ b/unittests.lisp @@ -29,7 +29,10 @@ ;;; TESTS (defun run-lisp-stat-tests () - (run-tests :suite 'lisp-stat)) + (run-tests :suite 'lisp-stat-ut)) + +;; (run-lisp-stat-tests) + (defun run-lisp-stat-test (&rest x) (run-test x)) @@ -368,6 +371,3 @@ (binomial-rand 5 3 0.4) (list 2 2 0 1 2))))) - - - \ No newline at end of file -- 2.11.4.GIT