Update of /project/cl-prevalence/cvsroot/cl-prevalence/test
In directory clnet:/tmp/cvs-serv14547/test
Modified Files:
test-serialization.lisp
Log Message:
fixed a bug serializing empty hashtables in s-expr format (thx to Sacha De Vos for reporting this)
--- /project/cl-prevalence/cvsroot/cl-prevalence/test/test-serialization.lisp 2006/01/31 12:41:48 1.5
+++ /project/cl-prevalence/cvsroot/cl-prevalence/test/test-serialization.lisp 2007/03/16 15:37:18 1.6
@@ -1,6 +1,6 @@
;;;; -*- mode: Lisp -*-
;;;;
-;;;; $Id: test-serialization.lisp,v 1.5 2006/01/31 12:41:48 scaekenberghe Exp $
+;;;; $Id: test-serialization.lisp,v 1.6 2007/03/16 15:37:18 scaekenberghe Exp $
;;;;
;;;; Testing XML and S-Expression based Serialization for Common Lisp and CLOS
;;;;
@@ -277,4 +277,16 @@
(maphash #'(lambda (k v) (assert (equal v (gethash k h2)))) *hashtable*)
(maphash #'(lambda (k v) (assert (equal v (gethash k *hashtable*)))) h2))
+(defparameter *empty-hashtable* (make-hash-table))
+
+(let (h2)
+ (setf h2 (serialize-and-deserialize-xml *empty-hashtable*))
+ (maphash #'(lambda (k v) (assert (equal v (gethash k h2)))) *empty-hashtable*)
+ (maphash #'(lambda (k v) (assert (equal v (gethash k *hashtable*)))) h2))
+
+(let (h2)
+ (setf h2 (serialize-and-deserialize-sexp *empty-hashtable*))
+ (maphash #'(lambda (k v) (assert (equal v (gethash k h2)))) *empty-hashtable*)
+ (maphash #'(lambda (k v) (assert (equal v (gethash k *hashtable*)))) h2))
+
;;; eof