Commit 46e1e734 authored by Liam M. Healy's avatar Liam M. Healy
Browse files

Test ntuple in histogram by writing the data to a temporary file, then reading the file

parent ee46e1e1
...@@ -122,6 +122,7 @@ combination for which the following are supported:</p> ...@@ -122,6 +122,7 @@ combination for which the following are supported:</p>
</li> </li>
<li><a href="http://www.cliki.net/trivial-garbage">trivial-garbage</a> <li><a href="http://www.cliki.net/trivial-garbage">trivial-garbage</a>
<li><a href="http://repo.or.cz/w/antik.git">Antik</a><li><a href="http://www.cliki.net/asdf">ASDF</a></li> <li><a href="http://repo.or.cz/w/antik.git">Antik</a><li><a href="http://www.cliki.net/asdf">ASDF</a></li>
<li>Osicat</li>
<li><a href="http://repo.or.cz/w/lisp-unit.git">lisp-unit</a>, <i>(Optional)</i> necessary <li><a href="http://repo.or.cz/w/lisp-unit.git">lisp-unit</a>, <i>(Optional)</i> necessary
to run <code>gsll-tests</code> to run <code>gsll-tests</code>
</li> </li>
...@@ -152,9 +153,10 @@ combination for which the following are supported:</p> ...@@ -152,9 +153,10 @@ combination for which the following are supported:</p>
and <code>libffi-dev</code>. Once they are installed and you have and <code>libffi-dev</code>. Once they are installed and you have
loaded the quicklisp file: loaded the quicklisp file:
<pre> <pre>
(ql:quickload "gsll-tests")</pre> (ql:quickload "gsll")</pre>
<p>To test your installation: <p>To test your installation:
<pre> <pre>
(ql:quickload "lisp-unit")
(in-package :gsl) (in-package :gsl)
(lisp-unit:run-tests)</pre> (lisp-unit:run-tests)</pre>
<p>The result should look something like: <p>The result should look something like:
...@@ -167,8 +169,8 @@ AIRY: 73 assertions passed, 0 failed.</pre> ...@@ -167,8 +169,8 @@ AIRY: 73 assertions passed, 0 failed.</pre>
VECTOR-VARIANCE-WITH-MEAN: 10 assertions passed, 0 failed. VECTOR-VARIANCE-WITH-MEAN: 10 assertions passed, 0 failed.
WEIBULL: 60 assertions passed, 0 failed. WEIBULL: 60 assertions passed, 0 failed.
ZETA: 6 assertions passed, 0 failed. ZETA: 6 assertions passed, 0 failed.
TOTAL: 4019 assertions passed, 1 failed, 0 execution errors.</pre> TOTAL: 4022 assertions passed, 1 failed, 0 execution errors.</pre>
<p>You may see more failures. <p>You may see more failures; if you are not on a 64 bit platform you will see fewer assertions.
<h3>License</h3> <h3>License</h3>
<p> <p>
...@@ -343,7 +345,7 @@ four-digit number; please attach them all to your email. ...@@ -343,7 +345,7 @@ four-digit number; please attach them all to your email.
<!-- Created: Feb 25 2005 --> <!-- Created: Feb 25 2005 -->
<!-- hhmts start --> <!-- hhmts start -->
<small> <small>
Time-stamp: <2011-08-17 01:00:15EDT index.html> Time-stamp: <2011-08-19 10:00:41EDT index.html>
</small> </small>
<!-- hhmts end --> <!-- hhmts end -->
</div> </div>
......
;; Definition of GSLL system ;; Definition of GSLL system
;; Liam Healy ;; Liam Healy
;; Time-stamp: <2011-01-30 10:41:57EST gsll.asd> ;; Time-stamp: <2011-08-19 08:59:15EDT gsll.asd>
;; ;;
;; Copyright 2006, 2007, 2008, 2009, 2010, 2011 Liam M. Healy ;; Copyright 2006, 2007, 2008, 2009, 2010, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
:version "0" :version "0"
:author "Liam M. Healy" :author "Liam M. Healy"
:licence "GPL v3" :licence "GPL v3"
:depends-on (antik cffi-grovel trivial-garbage alexandria #+fsbv fsbv) :depends-on (antik cffi-grovel trivial-garbage alexandria #+fsbv fsbv
osicat)
:components :components
((:module init ((:module init
:components :components
......
;; N-tuples ;; N-tuples
;; Liam Healy Sat Feb 3 2007 - 12:53 ;; Liam Healy Sat Feb 3 2007 - 12:53
;; Time-stamp: <2011-05-26 12:37:35EDT ntuple.lisp> ;; Time-stamp: <2011-08-19 09:44:16EDT ntuple.lisp>
;; ;;
;; Copyright 2007, 2008, 2009 Liam M. Healy ;; Copyright 2007, 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
;; ;;
;; This program is free software: you can redistribute it and/or modify ;; This program is free software: you can redistribute it and/or modify
...@@ -159,10 +159,8 @@ ...@@ -159,10 +159,8 @@
(defparameter *ntuple-example-data-file* (defparameter *ntuple-example-data-file*
(namestring (namestring
(merge-pathnames (merge-pathnames "ntuple-example.dat" osicat::*temporary-directory*))
"ntuple-example.dat" ;;(asdf:system-relative-pathname :gsll #p"histogram/ntuple-example.dat")
(asdf:component-pathname
(asdf:find-component (asdf:find-system :gsll) "histogram"))))
"The full path string of the ntuple example data file. This can be created "The full path string of the ntuple example data file. This can be created
with the function #'make-ntuple-example-data.") with the function #'make-ntuple-example-data.")
...@@ -238,6 +236,12 @@ ...@@ -238,6 +236,12 @@
(unless (= (grid:aref histo row) (aref answer row)) (unless (= (grid:aref histo row) (aref answer row))
(return nil)))))) (return nil))))))
(save-test ntuple (defun ntuple-example-make-read ()
(ntuple-example-read) "Create an ntuple historgram example data file, and read it."
(make-ntuple-example-data)
(ntuple-example-read))
(save-test
ntuple
(ntuple-example-make-read)
(ntuple-example-histogramming)) (ntuple-example-histogramming))
;; Regression test NTUPLE for GSLL, automatically generated ;; Regression test NTUPLE for GSLL, automatically generated
;; ;;
;; Copyright 2009 Liam M. Healy ;; Copyright 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
;; ;;
;; This program is free software: you can redistribute it and/or modify ;; This program is free software: you can redistribute it and/or modify
...@@ -19,6 +19,6 @@ ...@@ -19,6 +19,6 @@
(in-package :gsl) (in-package :gsl)
(LISP-UNIT:DEFINE-TEST NTUPLE (LISP-UNIT:DEFINE-TEST NTUPLE
(LISP-UNIT:ASSERT-true (NTUPLE-EXAMPLE-READ)) (LISP-UNIT:ASSERT-true (NTUPLE-EXAMPLE-make-READ))
(LISP-UNIT:ASSERT-true (NTUPLE-EXAMPLE-HISTOGRAMMING))) (LISP-UNIT:ASSERT-true (NTUPLE-EXAMPLE-HISTOGRAMMING)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment