Changeset 47 for trunk/histogram

Show
Ignore:
Timestamp:
03/28/08 03:12:26 (8 months ago)
Author:
lhealy
Message:

Unification of errors and warnings using a single class
'gsl-condition. Each numbered GSL conditions is a subclass of this
condition, under the name given by GSL, e.g. 'EDOM.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/histogram/updating-accessing.lisp

    r26 r47  
    11;; Updating and accessing histogram elements. 
    22;; Liam Healy, Mon Jan  1 2007 - 14:43 
    3 ;; Time-stamp: <2008-02-23 18:49:16EST updating-accessing.lisp> 
     3;; Time-stamp: <2008-03-27 23:09:26EDT updating-accessing.lisp> 
    44;; $Id$ 
    55 
     
    117117              ((first values) (second values)))) 
    118118 
    119 ;;; Examples and unit test 
    120  
    121 #| 
    122 (make-tests histogram 
    123119 (letm ((histo (histogram 10)))         ; should be a gsl-warning here, how to check? 
    124120     (set-ranges-uniform histo 0.0d0 10.0d0) 
    125121     (increment histo -2.0d0)) 
     122;;; Examples and unit test 
     123 
     124#| 
     125(make-tests histogram 
     126   ;; The first one gives a warning while compiling in SBCL, 
     127   ;; should only give a warning while runnin. 
     128 (letm ((histo (histogram 10))) 
     129     (set-ranges-uniform histo 0.0d0 10.0d0) 
     130     (increment histo -2.0d0)) 
    126131 (letm ((histo (histogram 10))) 
    127132   (set-ranges-uniform histo 0.0d0 10.0d0) 
     
    162167 
    163168(LISP-UNIT:DEFINE-TEST HISTOGRAM 
    164   (LISP-UNIT::ASSERT-NUMERICAL-EQUAL 
    165    (LIST) 
    166    (MULTIPLE-VALUE-LIST 
    167     (LETM ((HISTO (HISTOGRAM 10))) 
    168       (SET-RANGES-UNIFORM HISTO 0.0d0 10.0d0) 
    169       (INCREMENT HISTO -2.0d0)))) 
     169  (LISP-UNIT:ASSERT-ERROR 
     170   'GSL-CONDITION 
     171   (LETM ((HISTO (HISTOGRAM 10))) 
     172     (SET-RANGES-UNIFORM HISTO 0.0d0 10.0d0) 
     173     (INCREMENT HISTO -2.0d0))) 
    170174  (LISP-UNIT::ASSERT-NUMERICAL-EQUAL 
    171175   (LIST 0.0d0) 
     
    193197      (MAREF HISTO 6)))) 
    194198  (LISP-UNIT:ASSERT-ERROR 
    195    'GSL-ERROR 
     199   'GSL-CONDITION 
    196200   (LETM ((HISTO (HISTOGRAM 10))) 
    197201     (SET-RANGES-UNIFORM HISTO 0.0d0 10.0d0)