X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Ftest-ooddl.lisp;h=ba671e603d1459a6c11f95aab4c4051f435324b2;hb=b43e20a168dae4ae9d176ebc0fbf18ea6e4517dc;hp=7089eba9b437b3de0b68f908bc26ad487b959249;hpb=70227e5f0b76bb649fc6c1a478d7374953fd815b;p=clsql.git diff --git a/tests/test-ooddl.lisp b/tests/test-ooddl.lisp index 7089eba..ba671e6 100644 --- a/tests/test-ooddl.lisp +++ b/tests/test-ooddl.lisp @@ -4,14 +4,15 @@ ;;;; Author: Marcus Pearce ;;;; 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. ;;;; ====================================================================== @@ -25,25 +26,25 @@ ;; Ensure slots inherited from standard-classes are :virtual (deftest :ooddl/metaclass/1 (values - (clsql-sys::view-class-slot-db-kind - (clsql-sys::slotdef-for-slot-with-class 'extraterrestrial + (clsql::view-class-slot-db-kind + (clsql::slotdef-for-slot-with-class 'extraterrestrial (find-class 'person))) - (clsql-sys::view-class-slot-db-kind - (clsql-sys::slotdef-for-slot-with-class 'hobby (find-class 'person)))) + (clsql::view-class-slot-db-kind + (clsql::slotdef-for-slot-with-class 'hobby (find-class 'person)))) :virtual :virtual) ;; Ensure all slots in view-class are view-class-effective-slot-definition (deftest :ooddl/metaclass/2 (values (every #'(lambda (slotd) - (typep slotd 'clsql-sys::view-class-effective-slot-definition)) - (clsql-sys::class-slots (find-class 'person))) + (typep slotd 'clsql::view-class-effective-slot-definition)) + (clsql::class-slots (find-class 'person))) (every #'(lambda (slotd) - (typep slotd 'clsql-sys::view-class-effective-slot-definition)) - (clsql-sys::class-slots (find-class 'employee))) + (typep slotd 'clsql::view-class-effective-slot-definition)) + (clsql::class-slots (find-class 'employee))) (every #'(lambda (slotd) - (typep slotd 'clsql-sys::view-class-effective-slot-definition)) - (clsql-sys::class-slots (find-class 'company)))) + (typep slotd 'clsql::view-class-effective-slot-definition)) + (clsql::class-slots (find-class 'company)))) t t t) (deftest :ooddl/join/1 @@ -62,11 +63,12 @@ (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)))) @@ -75,12 +77,13 @@ (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)))))