r9230: fix loop tests
[clsql.git] / tests / test-ooddl.lisp
index 7089eba9b437b3de0b68f908bc26ad487b959249..3bbaa2d1d7f44a568660753c82d95aeb958139eb 100644 (file)
@@ -4,14 +4,15 @@
 ;;;; Author:  Marcus Pearce <m.t.pearce@city.ac.uk>
 ;;;; Created: 30/03/2004
 ;;;; Updated: $Id$
-;;;; ======================================================================
-;;;;
-;;;; Description ==========================================================
-;;;; ======================================================================
 ;;;;
 ;;;; Tests for the CLSQL Object Oriented Data Definition Language
 ;;;; (OODDL).
 ;;;;
+;;;; This file is part of CLSQL.
+;;;;
+;;;; CLSQL users are granted the rights to distribute and use this software
+;;;; as governed by the terms of the Lisp Lesser GNU Public License
+;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
 ;;;; ======================================================================
 
 
 
 (deftest :ooddl/time/1
     (let* ((now (clsql-base:get-time)))
-      (when (member *test-database-type* '(:postgresql :postgresql-socket))
+      (when (member *test-database-underlying-type* '(:postgresql :postgresql-socket))
         (clsql:execute-command "set datestyle to 'iso'"))
       (clsql:update-records [employee] :av-pairs `((birthday ,now))
                            :where [= [emplid] 1])
-      (let ((dbobj (car (clsql:select 'employee :where [= [birthday] now]))))
+      (let ((dbobj (car (clsql:select 'employee :where [= [birthday] now] 
+                                     :flatp t))))
         (values
          (slot-value dbobj 'last-name)
          (clsql-base:time= (slot-value dbobj 'birthday) now))))
 (deftest :ooddl/time/2
     (let* ((now (clsql-base:get-time))
            (fail-index -1))
-      (when (member *test-database-type* '(:postgresql :postgresql-socket))
+      (when (member *test-database-underlying-type* '(:postgresql :postgresql-socket))
         (clsql:execute-command "set datestyle to 'iso'"))
       (dotimes (x 40)
         (clsql:update-records [employee] :av-pairs `((birthday ,now))
                              :where [= [emplid] 1])
-        (let ((dbobj (car (clsql:select 'employee :where [= [birthday] now]))))
+        (let ((dbobj (car (clsql:select 'employee :where [= [birthday] now]
+                                       :flatp t))))
           (unless (clsql-base:time= (slot-value dbobj 'birthday) now)
             (setf fail-index x))
           (setf now (clsql-base:roll now :day (* 10 x)))))