Changeset 14619 in project


Ignore:
Timestamp:
05/13/09 22:04:29 (11 years ago)
Author:
Jim Ursetto
Message:

sql-de-lite: massage tests for numbers egg

Location:
release/4/sql-de-lite/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/sql-de-lite/trunk/sql-de-lite.setup

    r14569 r14619  
    44 'sql-de-lite
    55 '("sql-de-lite.so" "sql-de-lite.import.so")
    6  '((version "0.3.2")))
     6 '((version "0.3.3")))
  • release/4/sql-de-lite/trunk/test.scm

    r14569 r14619  
    384384 "large integers"
    385385 ;; note int64 range on 32-bit is -2^53 ~ 2^53-1 where 2^53=9007199254740992
     386 ;; note max int64 range on 64-bit is -2^62 ~ 2^62-1;
     387 ;;     inexact will decrease range to 2^53
     388 ;; note numbers egg requires exact->inexact for non-fixnum; therefore
     389 ;;     injudicious application on 64-bit system reduces range to 2^53
    386390 (call-with-database ":memory:"
    387391   (lambda (db)
     
    390394       ;; Note the hardcoded insert to ensure the value is correct.
    391395       (exec (sql db "insert into cache(rowid,k,v) values(1234567890125, 'jimmy', 'dunno');"))
    392        (test (conc "last-insert-rowid on int64 rowid " rowid)
     396       (test (conc "last-insert-rowid on int64 rowid (fails w/ numbers) " rowid)
    393397             rowid
    394398             (last-insert-rowid db))
    395        (test (conc "retrieve row containing int64 rowid " rowid)
     399       (test (conc "retrieve row containing int64 rowid (fails w/ numbers) " rowid)
    396400             `(,rowid "jimmy" "dunno")
    397401             (exec (sql db "select rowid, * from cache where rowid = ?;")
    398                    rowid))))))
     402                   rowid))
     403       (test (conc "last-insert-rowid on int64 rowid (numbers ok) " rowid)
     404             (exact->inexact rowid)
     405             (last-insert-rowid db))
     406       (test (conc "retrieve row containing int64 rowid (numbers ok) " rowid)
     407             `(,(exact->inexact rowid) "jimmy" "dunno")
     408             (exec (sql db "select rowid, * from cache where rowid = ?;")
     409                   (exact->inexact rowid)))))))
    399410
    400411(test-group
Note: See TracChangeset for help on using the changeset viewer.