X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Ftest-ooddl.lisp;h=48d1630fd6a815acb8636d491f2e390170c2cafd;hb=8972490fe6f9453c5b70dae4fb1141cf9a67f0db;hp=9883b7aff4fb58c89a589d0c5f1f919eac4acbed;hpb=72c5d9d0555b01290409dc2607935db823fa1f10;p=clsql.git diff --git a/tests/test-ooddl.lisp b/tests/test-ooddl.lisp index 9883b7a..48d1630 100644 --- a/tests/test-ooddl.lisp +++ b/tests/test-ooddl.lisp @@ -26,31 +26,30 @@ ;; 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 - (mapcar #'(lambda (e) - (slot-value e 'companyid)) - (company-employees company1)) + (mapcar #'(lambda (e) (slot-value e 'ecompanyid)) + (company-employees company1)) (1 1 1 1 1 1 1 1 1 1)) (deftest :ooddl/join/2 @@ -62,29 +61,31 @@ "Lenin") (deftest :ooddl/time/1 - (let* ((now (clsql-base:get-time))) - (when (member *test-database-type* '(:postgresql :postgresql-socket)) + (let* ((now (clsql:get-time))) + (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)))) + (clsql:time= (slot-value dbobj 'birthday) now)))) "Lenin" t) (deftest :ooddl/time/2 - (let* ((now (clsql-base:get-time)) + (let* ((now (clsql: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])))) - (unless (clsql-base:time= (slot-value dbobj 'birthday) now) + (let ((dbobj (car (clsql:select 'employee :where [= [birthday] now] + :flatp t)))) + (unless (clsql:time= (slot-value dbobj 'birthday) now) (setf fail-index x)) - (setf now (clsql-base:roll now :day (* 10 x))))) + (setf now (clsql:roll now :day (* 10 x))))) fail-index) -1)