/[gcl]/gcl/ansi-tests/gethash.lsp
ViewVC logotype

Diff of /gcl/ansi-tests/gethash.lsp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by pfdietz, Sat Nov 29 02:03:11 2003 UTC revision 1.2 by pfdietz, Sat Nov 29 13:43:51 2003 UTC
# Line 36  Line 36 
36       (gethash 'x table)))       (gethash 'x table)))
37    y 1 y)    y 1 y)
38    
39    (deftest gethash.order.1
40      (let ((i 0) x y
41            (table (make-hash-table)))
42        (setf (gethash 'a table) 'b)
43        (values
44         (gethash (progn (setf x (incf i)) 'a)
45                  (progn (setf y (incf i)) table))
46         i x y))
47      b 2 1 2)
48    
49    (deftest gethash.order.2
50      (let ((i 0) x y z
51            (table (make-hash-table)))
52        (setf (gethash 'a table) 'b)
53        (values
54         (gethash (progn (setf x (incf i)) 'a)
55                  (progn (setf y (incf i)) table)
56                  (progn (setf z (incf i)) 'missing))
57         i x y z))
58      b 3 1 2 3)
59    
60    (deftest gethash.order.3
61      (let ((i 0) x y
62            (table (make-hash-table)))
63        (values
64          (setf (gethash (progn (setf x (incf i)) 'a)
65                         (progn (setf y (incf i)) table))
66                'b)
67          i x y
68          (gethash 'a table)))
69      b 2 1 2 b)
70    
71    (deftest gethash.order.4
72      (let ((i 0) x y z
73            (table (make-hash-table)))
74        (values
75          (setf (gethash (progn (setf x (incf i)) 'a)
76                         (progn (setf y (incf i)) table)
77                         (setf z (incf i)))
78                'b)
79          i x y z
80          (gethash 'a table)))
81      b 3 1 2 3 b)
82    
83    ;;;; Error tests
84    
85  (deftest gethash.error.1  (deftest gethash.error.1
86    (classify-error (gethash))    (classify-error (gethash))
87    program-error)    program-error)
# Line 47  Line 93 
93  (deftest gethash.error.3  (deftest gethash.error.3
94    (classify-error (gethash 'foo (make-hash-table) nil nil))    (classify-error (gethash 'foo (make-hash-table) nil nil))
95    program-error)    program-error)
   

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26