X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Ftest-ooddl.lisp;h=d2b73f48278208f4feafab93c0697ebb9ae5ae1d;hb=e4778554b1dc8a130f9b189d760730ce5d76ced4;hp=48d1630fd6a815acb8636d491f2e390170c2cafd;hpb=8972490fe6f9453c5b70dae4fb1141cf9a67f0db;p=clsql.git diff --git a/tests/test-ooddl.lisp b/tests/test-ooddl.lisp index 48d1630..d2b73f4 100644 --- a/tests/test-ooddl.lisp +++ b/tests/test-ooddl.lisp @@ -26,25 +26,25 @@ ;; Ensure slots inherited from standard-classes are :virtual (deftest :ooddl/metaclass/1 (values - (clsql::view-class-slot-db-kind - (clsql::slotdef-for-slot-with-class 'extraterrestrial + (clsql-sys::view-class-slot-db-kind + (clsql-sys::slotdef-for-slot-with-class 'extraterrestrial (find-class 'person))) - (clsql::view-class-slot-db-kind - (clsql::slotdef-for-slot-with-class 'hobby (find-class 'person)))) + (clsql-sys::view-class-slot-db-kind + (clsql-sys::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::view-class-effective-slot-definition)) - (clsql::class-slots (find-class 'person))) + (typep slotd 'clsql-sys::view-class-effective-slot-definition)) + (clsql-sys::class-slots (find-class 'person))) (every #'(lambda (slotd) - (typep slotd 'clsql::view-class-effective-slot-definition)) - (clsql::class-slots (find-class 'employee))) + (typep slotd 'clsql-sys::view-class-effective-slot-definition)) + (clsql-sys::class-slots (find-class 'employee))) (every #'(lambda (slotd) - (typep slotd 'clsql::view-class-effective-slot-definition)) - (clsql::class-slots (find-class 'company)))) + (typep slotd 'clsql-sys::view-class-effective-slot-definition)) + (clsql-sys::class-slots (find-class 'company)))) t t t) (deftest :ooddl/join/1 @@ -89,6 +89,18 @@ fail-index) -1) +(deftest :ooddl/time/3 + (progn + (when (member *test-database-underlying-type* '(:postgresql :postgresql-socket)) + (clsql:execute-command "set datestyle to 'iso'")) + (let ((dbobj (car (clsql:select 'employee :where [= [emplid] 10] + :flatp t)))) + (list + (eql *test-start-utime* (slot-value dbobj 'bd-utime)) + (clsql:time= (slot-value dbobj 'birthday) + (clsql:utime->time (slot-value dbobj 'bd-utime)))))) + (t t)) + )) #.(clsql:restore-sql-reader-syntax-state)